Skip to content

Commit

Permalink
feat(types): ctx.getLibFilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Dec 25, 2021
1 parent 332dac7 commit 17c8fe4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/@vuepress/types/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ export interface ResolvedTheme {
entry: string;
}

export interface LayoutComponent {
filename: string;
componentName: string;
path: string;
isInternal: string;
}

/**
* Theme API.
*/
Expand All @@ -122,7 +129,7 @@ export interface ThemeAPI {
parentTheme: ResolvedTheme;
existsParentTheme: boolean;
componentMap: Record<string, any>;
layoutComponentMap: Record<string, any>;
layoutComponentMap: Record<string, LayoutComponent>;
}

/**
Expand Down Expand Up @@ -178,4 +185,8 @@ export interface Context<
* Get site data.
*/
getSiteData(): SiteData;
/**
* Get internal file path
*/
getLibFilePath(string: string): string;
}

0 comments on commit 17c8fe4

Please sign in to comment.