From c8178edd90189c2523d521e5bf3b1a054200bc87 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Mon, 12 Oct 2020 08:09:27 +0200 Subject: [PATCH] Add type declaration (#12) --- index.d.ts | 6 ++++++ package.json | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..a90b761 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,6 @@ +declare module 'markdown-it-front-matter' { + import MarkdownIt from 'markdown-it/lib' + export type FrontMatterPluginOptions = (rawMeta: string) => void + const markdownItFrontMatter: MarkdownIt.PluginWithOptions + export = markdownItFrontMatter +} diff --git a/package.json b/package.json index 181a8d7..52b3cad 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "url": "git://github.com/ParkSB/markdown-it-front-matter.git" }, "main": "index.js", + "types": "index.d.ts", "keywords": [ "markdown-it-plugin", "markdown-it", @@ -23,6 +24,7 @@ "license": "MIT", "devDependencies": { "markdown-it": "^10.0.0", + "@types/markdown-it": "^10.0.0", "mocha": "^7.0.1" }, "scripts": {