Skip to content

Commit

Permalink
feat: add type to layout (#2389)
Browse files Browse the repository at this point in the history
Co-authored-by: Farnabaz <farnabaz@gmail.com>
  • Loading branch information
Barbapapazes and farnabaz committed Oct 24, 2023
1 parent acfef26 commit e5d0029
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"dev:build": "nuxi build playground/basic",
"prepare": "nuxi prepare playground/basic",
"dev:fixtures": "./scripts/fixture.sh",
"build": "nuxt-module-build && pnpm build:web-types",
"build": "nuxt-module-build build && pnpm build:web-types",
"build:docs": "(cd docs && nuxi build)",
"build:web-types": "vue-docgen-web-types src/runtime/components/ ./dist/web-types.json",
"example": "./scripts/example.sh",
Expand Down Expand Up @@ -114,5 +114,10 @@
"hooks": {
"after:bump": "npx changelogen@latest --no-commit --no-tag --output --r $(node -p \"require('./package.json').version\")"
}
},
"build": {
"externals": [
"#build/types/layouts"
]
}
}
3 changes: 2 additions & 1 deletion src/runtime/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { LayoutKey } from '#build/types/layouts'
import type { Theme } from 'shiki-es'
import type { StorageValue } from 'unstorage'

Expand Down Expand Up @@ -48,7 +49,7 @@ export interface ParsedContentMeta extends ParsedContentInternalMeta {
/**
* Layout
*/
layout?: string
layout?: LayoutKey

[key: string]: any
}
Expand Down

0 comments on commit e5d0029

Please sign in to comment.