feat: add content typing
This commit is contained in:
parent
03071a29b2
commit
ee6cbd3614
10
types/content/index.ts
Normal file
10
types/content/index.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { IContentDocument } from '@nuxt/content/types/content'
|
||||
|
||||
export interface INavLink {
|
||||
category: string,
|
||||
contentDocuments: IContentDocument[]
|
||||
}
|
||||
|
||||
export interface ILink {
|
||||
[key: string]: IContentDocument[]
|
||||
}
|
18
types/content/page.ts
Normal file
18
types/content/page.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { IContentDocument } from '@nuxt/content/types/content'
|
||||
|
||||
export interface IToc {
|
||||
id: string;
|
||||
depth: number;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface IContent extends IContentDocument {
|
||||
body: Object;
|
||||
category: string;
|
||||
description: string;
|
||||
position: number;
|
||||
title: string;
|
||||
toc: IToc[];
|
||||
image: string;
|
||||
tags: string[];
|
||||
}
|
4
types/vue-shims.d.ts
vendored
Normal file
4
types/vue-shims.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module '*.vue' {
|
||||
import Vue from 'vue'
|
||||
export default Vue
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user