File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
packages/@vuepress/shared/src/types Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -54,18 +54,18 @@ export type PageData<
54
54
* Notice that frontmatter is parse from yaml or other languages,
55
55
* so we cannot guarantee the type safety
56
56
*/
57
- export interface PageFrontmatter {
58
- layout ?: string | unknown
59
- permalink ?: string | unknown
57
+ export type PageFrontmatter <
58
+ T extends Record < any , any > = Record < string , unknown >
59
+ > = Partial < T > & {
60
+ layout ?: string
61
+ permalink ?: string
60
62
permalinkPattern ?: string
61
- date ?: string | Date | unknown
63
+ date ?: string | Date
62
64
63
- lang ?: string | unknown
64
- title ?: string | unknown
65
- description ?: string | unknown
66
- head ?: HeadConfig [ ] | unknown
67
-
68
- [ key : string ] : unknown
65
+ lang ?: string
66
+ title ?: string
67
+ description ?: string
68
+ head ?: HeadConfig [ ]
69
69
}
70
70
71
71
/**
You can’t perform that action at this time.
0 commit comments