Skip to content

Commit

Permalink
fix(types): fix vitepress/theme type
Browse files Browse the repository at this point in the history
close #489, close #438, close #494, close #442
  • Loading branch information
yyx990803 committed Jan 15, 2022
1 parent 2566bc9 commit eabf6d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"bin",
"dist",
"types",
"client.d.ts"
"client.d.ts",
"theme.d.ts"
],
"scripts": {
"dev": "run-s dev-shared dev-start",
Expand Down
10 changes: 8 additions & 2 deletions theme.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// so that users can do `import DefaultTheme from 'vitepress/theme'`
import DefaultTheme from './dist/client/theme-default/index'
export default DefaultTheme
import { ComponentOptions } from 'vue'

declare const defaultTheme: {
Layout: ComponentOptions
NotFound: ComponentOptions
}

export default defaultTheme

0 comments on commit eabf6d2

Please sign in to comment.