From b1f42daf17f703b34d0ab5aa80da5baec30497a1 Mon Sep 17 00:00:00 2001 From: itosa-kazu Date: Wed, 10 Jun 2026 05:49:24 +0900 Subject: [PATCH] Fix generated declaration types --- package.json | 2 +- src/options.js | 2 ++ src/plugin.js | 2 +- src/renderers.js | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9f20c2f..ffa80b8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "module", "description": "Markdown-it plugin to include math in your document", "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "exports": { ".": { "types": "./types/index.d.ts", diff --git a/src/options.js b/src/options.js index a1985f5..c17298f 100644 --- a/src/options.js +++ b/src/options.js @@ -1,6 +1,8 @@ /** * @typedef {string | [string, string]} Delimiter * @typedef {string | [tag: string, attrs?: Record]} CustomElementOption + * @typedef {import("markdown-it/dist/index.cjs.js")} MarkdownIt + * @typedef {import("markdown-it/lib/token.mjs").default} Token * @callback Renderer * @param {string} src - The source content * @param {Token} token - The parsed markdown-it token diff --git a/src/plugin.js b/src/plugin.js index 3c4f396..b2f0e68 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -1,6 +1,6 @@ /** * @typedef {import("mathup").Options} MathupOptions - * @typedef {import("markdown-it").default} MarkdownIt + * @typedef {import("markdown-it/dist/index.cjs.js")} MarkdownIt * @typedef {import("markdown-it/lib/token.mjs").default} Token * * @typedef {import("./options.js").CustomElementOption} CustomElementOption diff --git a/src/renderers.js b/src/renderers.js index a94dc1c..022015d 100644 --- a/src/renderers.js +++ b/src/renderers.js @@ -1,6 +1,6 @@ /** * @typedef {import("mathup").Options} MathupOptions - * @typedef {import("markdown-it").default} MarkdownIt + * @typedef {import("markdown-it/dist/index.cjs.js")} MarkdownIt * @typedef {import("./options.js").CustomElementOption} CustomElementOption */