UNPKG

@tdb/web

Version:

Common condiguration for serving a web-site and testing web-based UI components.

73 lines (72 loc) 1.87 kB
export declare type IParseResponse<T = {}> = { data?: T; error?: { message: string; }; }; export declare type IManifestResponse = { status: number; elapsed: number; error?: { message: string; }; manifest?: IManifest; }; export declare type IManifest = { path: string; resources: IManifestResource[]; }; export declare type IManifestResource = IManifestFolder | IManifestFile | IManifestImage | IManifestMarkdown | IManifestJson | IManifestYaml; export declare type ManifestFileType = IManifestFolder['type'] | IManifestFile['type'] | IManifestImage['type'] | IManifestMarkdown['type'] | IManifestJson['type'] | IManifestYaml['type']; export declare type IManifestCommon = { path: string; error?: { message: string; }; }; export declare type IManifestFolder = IManifestCommon & { type: 'FOLDER'; }; export declare type IManifestFile = IManifestCommon & { type: 'FILE'; }; export declare type IManifestImage = IManifestCommon & { type: 'FILE/image'; name: string; ext: string; path2x?: string; width?: number; height?: number; }; export declare type IManifestMarkdown = IManifestCommon & { type: 'FILE/markdown'; markdown?: IMarkdown; }; export declare type IManifestJson = IManifestCommon & { type: 'FILE/json'; data?: { [key: string]: any; }; }; export declare type IManifestYaml = IManifestCommon & { type: 'FILE/yaml'; data?: { [key: string]: any; }; }; export declare type IMarkdown = { title?: string; sections: IMarkdownSection[]; }; export declare type IMarkdownSection<T = {}> = { index: number; depth: number; data: Array<IMarkdownData<T>>; title?: string; titleHtml?: string; html?: string; }; export declare type IMarkdownData<T = {}> = { value: T; meta?: string; };