vite-bolt/plugin/types/index.ts

117 lines
1.5 KiB
TypeScript
Raw Normal View History

2023-02-01 17:52:53 +08:00
export interface ITocItem {
/**
* hash
*/
anchor: string;
/**
* mardkown h标签 innerHTML
*/
content: string;
i: 0;
lvl: 1;
seen: 0;
/**
* innerHTML
*/
slug: "hi";
/**
*
*/
active?: boolean;
}
/**
* props
*/
export interface IPropMeta {
/**
* ts ?
*/
required?: boolean;
/**
* @name
*/
name?: string;
/**
* @type
*/
type?: string;
/**
* @description
*/
description?: string;
/**
* @default
*/
default?: string;
/**
* @version
*/
version?: string | number;
}
/**
* 🎄
*/
export interface ICompoTree {
[key: string]: ICompoMetadata;
}
/**
* ICompoTree Item
*/
export interface ICompoMetadata {
/**
* props
*/
props: IPropMeta[] | [];
/**
* markdown table of content
*/
toc: [];
}
export interface ITree {
/**
* 🎄
*/
compoTree: ICompoTree;
/**
* 🎄
*/
fileTree?: {};
/**
* 🎄 menuTree
*/
routerList: IRoute[];
/**
*
*/
config?: {
title: string;
subTitle: string;
};
}
export interface IRoute {
name: string;
path: string;
active: boolean;
}
export type TToc = {
content: string;
slug: string;
lvl: 1 | 2;
i?: number;
seen?: number;
active?: boolean;
anchor: string;
};
export interface ICustomPage {
path: string;
src: string;
title: string;
}