Skip to content

Commit

Permalink
chore: add global TS type in mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
vikiboss committed Aug 23, 2024
1 parent 085aac9 commit 52900b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions docs/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type Category = string

type Feature = 'Pausable' | 'IsSupported' | 'LowLevel' | 'DevOnly'

declare const frontmatter: {
category: Category
features: Feature[]
deprecated?: boolean
}
2 changes: 1 addition & 1 deletion docs/rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineConfig({
builderPlugins,
builderConfig: {
html: {
tags: [{ tag: 'script', children: "window.RSPRESS_THEME = 'light';" }],
tags: process.env.IS_SODOC ? [{ tag: 'script', children: "window.RSPRESS_THEME = 'light';" }] : [],
},
output: {
cleanDistPath: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"i18n": ["./i18n.json"]
}
},
"include": ["./src/**/*", "./docs/**/*", "../src/**/demo.tsx", "../src/**/*.mdx"],
"include": ["./global.d.ts", "./src/**/*", "./docs/**/*", "../src/**/demo.tsx", "../src/**/*.mdx"],
"references": [{ "path": "./tsconfig.node.json" }],
"mdx": {
"checkMdx": true
Expand Down

0 comments on commit 52900b6

Please sign in to comment.