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

Commit afe73d1

Browse files
committed
fix: missing types
1 parent 2986dbf commit afe73d1

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/client/classification.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { findPageByKey } from '@app/util'
33
// @ts-ignore
44
import frontmatterClassifiedMap from '@dynamic/vuepress_blog/frontmatterClassified'
5-
import { VuePressPage } from '../types/VuePress'
5+
import { VuePressPage } from '../interface/VuePress'
66

77
class Classifiable {
88
private _metaMap: any
@@ -76,7 +76,7 @@ export default ({ Vue }) => {
7676
return map
7777
}, {})
7878

79-
computed.$frontmatterKey = function() {
79+
computed.$frontmatterKey = function () {
8080
// @ts-ignore
8181
const target = this[`$${this.$route.meta.id}`]
8282
if (target) {

src/interface/VuePress.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Vue from "vue";
2+
export interface VuePressPage {
3+
key: string;
4+
regularPath: string;
5+
frontmatter: Record<string, string>;
6+
}
7+
export interface VuePressContext {
8+
pages: VuePressPage[];
9+
themeAPI: {
10+
layoutComponentMap: Record<string, Vue>;
11+
};
12+
addPage: any;
13+
sourceDir: string;
14+
}

src/node/interface/VuePress.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
VuePressContext as BaseContext,
33
VuePressPage as BasePage,
4-
} from '../../types/VuePress'
4+
} from '../../interface/VuePress'
55
import { FrontmatterClassificationPage } from './Frontmatter'
66
import { SerializedPagination } from './Pagination'
77

@@ -13,4 +13,4 @@ export interface VuePressContext extends BaseContext {
1313
getLayout: (name?: string, fallback?: string) => string | undefined;
1414
}
1515

16-
export interface VuePressPage extends BasePage {}
16+
export interface VuePressPage extends BasePage { }

0 commit comments

Comments
 (0)