diff --git a/package.json b/package.json index 077110db..58a38af9 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "build:docs": "npm run build && node docs/build.js", "build:man": "marked-man man/marked.1.md > man/marked.1", "build:reset": "git checkout upstream/master lib/marked.cjs lib/marked.umd.js lib/marked.esm.js marked.min.js", - "build:types": "tsc && dts-bundle-generator --project tsconfig.json -o lib/marked.d.ts src/marked.ts && dts-bundle-generator --project tsconfig.json -o lib/marked.d.cts src/marked.ts", + "build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.cts src/marked.ts", "lint": "eslint --fix", "rollup": "rollup -c rollup.config.js", "rules": "node test/rules.js", diff --git a/src/marked.ts b/src/marked.ts index 7ec18f5a..e6ce66b3 100644 --- a/src/marked.ts +++ b/src/marked.ts @@ -117,5 +117,4 @@ export { _TextRenderer as TextRenderer } from './TextRenderer.ts'; export { _Hooks as Hooks } from './Hooks.ts'; export { Marked } from './Instance.ts'; export type * from './MarkedOptions.ts'; -export type * from './rules.ts'; export type * from './Tokens.ts'; diff --git a/test/types/marked.ts b/test/types/marked.ts index b8caa9ab..7c799f92 100644 --- a/test/types/marked.ts +++ b/test/types/marked.ts @@ -370,3 +370,11 @@ marked.use({ } } }); + +// @ts-expect-error block is not exported +import { block } from 'marked'; +// @ts-expect-error inline is not exported +import { inline } from 'marked'; +// Rules is exported +import type { Rules } from 'marked'; +