Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't export block or inline #3427

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/marked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
8 changes: 8 additions & 0 deletions test/types/marked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,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';