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

fix: missing types #17

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/client/classification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { findPageByKey } from '@app/util'
// @ts-ignore
import frontmatterClassifiedMap from '@dynamic/vuepress_blog/frontmatterClassified'
import { VuePressPage } from '../types/VuePress'
import { VuePressPage } from '../interface/VuePress'

class Classifiable {
private _metaMap: any
Expand Down Expand Up @@ -76,7 +76,7 @@ export default ({ Vue }) => {
return map
}, {})

computed.$frontmatterKey = function() {
computed.$frontmatterKey = function () {
// @ts-ignore
const target = this[`$${this.$route.meta.id}`]
if (target) {
Expand Down
14 changes: 14 additions & 0 deletions src/interface/VuePress.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Vue from "vue";
export interface VuePressPage {
key: string;
regularPath: string;
frontmatter: Record<string, string>;
}
export interface VuePressContext {
pages: VuePressPage[];
themeAPI: {
layoutComponentMap: Record<string, Vue>;
};
addPage: any;
sourceDir: string;
}
4 changes: 2 additions & 2 deletions src/node/interface/VuePress.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
VuePressContext as BaseContext,
VuePressPage as BasePage,
} from '../../types/VuePress'
} from '../../interface/VuePress'
import { FrontmatterClassificationPage } from './Frontmatter'
import { SerializedPagination } from './Pagination'

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

export interface VuePressPage extends BasePage {}
export interface VuePressPage extends BasePage { }
6 changes: 4 additions & 2 deletions tsconfig.client.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"compilerOptions": {
"target": "es2015",
"module": "esnext",
"outDir": "./lib/client"
"outDir": "./lib"
},
"include": ["./src/client/**/*.ts"]
"include": [
"./src/client/**/*.ts"
]
}
6 changes: 4 additions & 2 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"outDir": "./lib/node"
"outDir": "./lib"
},
"include": ["./src/node/**/*.ts"]
"include": [
"./src/node/**/*.ts"
]
}