diff --git a/types/markdown-it-source-map/index.d.ts b/types/markdown-it-source-map/index.d.ts new file mode 100644 index 0000000000..5b5e4dde5f --- /dev/null +++ b/types/markdown-it-source-map/index.d.ts @@ -0,0 +1,9 @@ +// Type definitions for markdown-it-source-map 0.1 +// Project: https://github.com/tylingsoft/markdown-it-source-map#readme +// Definitions by: Felix Wotschofsky +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import MarkdownIt = require('markdown-it'); + +declare const markdownItSourceMap: MarkdownIt.PluginSimple; +export default markdownItSourceMap; diff --git a/types/markdown-it-source-map/markdown-it-source-map-tests.ts b/types/markdown-it-source-map/markdown-it-source-map-tests.ts new file mode 100644 index 0000000000..257502175d --- /dev/null +++ b/types/markdown-it-source-map/markdown-it-source-map-tests.ts @@ -0,0 +1,10 @@ +// From original package README +// https://github.com/tylingsoft/markdown-it-source-map/blob/b5c374465ebd2a182b90720b99809f4c1b48b178/README.md + +import * as markdownIt from 'markdown-it'; +import markdownItSourceMap from 'markdown-it-source-map'; + +const mdi = markdownIt(); +mdi.use(markdownItSourceMap); + +mdi.render('# hello world'); //

hello world

diff --git a/types/markdown-it-source-map/tsconfig.json b/types/markdown-it-source-map/tsconfig.json new file mode 100644 index 0000000000..bf938a2260 --- /dev/null +++ b/types/markdown-it-source-map/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "markdown-it-source-map-tests.ts" + ] +} diff --git a/types/markdown-it-source-map/tslint.json b/types/markdown-it-source-map/tslint.json new file mode 100644 index 0000000000..794cb4bf3e --- /dev/null +++ b/types/markdown-it-source-map/tslint.json @@ -0,0 +1 @@ +{ "extends": "@definitelytyped/dtslint/dt.json" }