Skip to content

Commit 17c8fe4

Browse files
committedDec 25, 2021
feat(types): ctx.getLibFilePath
1 parent 332dac7 commit 17c8fe4

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
 

‎packages/@vuepress/types/src/context.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ export interface ResolvedTheme {
114114
entry: string;
115115
}
116116

117+
export interface LayoutComponent {
118+
filename: string;
119+
componentName: string;
120+
path: string;
121+
isInternal: string;
122+
}
123+
117124
/**
118125
* Theme API.
119126
*/
@@ -122,7 +129,7 @@ export interface ThemeAPI {
122129
parentTheme: ResolvedTheme;
123130
existsParentTheme: boolean;
124131
componentMap: Record<string, any>;
125-
layoutComponentMap: Record<string, any>;
132+
layoutComponentMap: Record<string, LayoutComponent>;
126133
}
127134

128135
/**
@@ -178,4 +185,8 @@ export interface Context<
178185
* Get site data.
179186
*/
180187
getSiteData(): SiteData;
188+
/**
189+
* Get internal file path
190+
*/
191+
getLibFilePath(string: string): string;
181192
}

0 commit comments

Comments
 (0)
Please sign in to comment.