Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix: add mising types (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz authored and billyyyyy3320 committed Sep 6, 2019
1 parent 784118f commit 303c619
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib
.temp
types
!src/types
src/**/*.js
dist

Expand Down
16 changes: 16 additions & 0 deletions src/types/VuePress.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Vue from 'vue'

export declare interface VuePressPage {
key: string;
regularPath: string;
frontmatter: Record<string, string>;
}

export declare interface VuePressContext {
sourceDir: string;
pages: VuePressPage[];
themeAPI: {
layoutComponentMap: Record<string, Vue>
};
addPage: any;
}
18 changes: 18 additions & 0 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { FrontmatterClassifiedMap } from '../node/interface/Classifier'

declare module '@app/util' {
import { VuePressPage } from './VuePress'

export function findPageByKey(pages: VuePressPage[], key: string): VuePressPage;
}

declare module '@dynamic/vuepress_blog/frontmatterClassified' {
import { FrontmatterClassifiedMap } from '../node/interface/Classifier'
export default FrontmatterClassifiedMap
}

declare module '@dynamic/vuepress_blog/paginations' {
import { SerializedPagination } from '../node/interface/Pagination'
export default SerializedPagination
}

0 comments on commit 303c619

Please sign in to comment.