-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
45 lines (36 loc) · 972 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
export type LabelAttribute = `#${string}`;
export type RelationAttribute = `~${string}`;
export type Attribute = LabelAttribute | RelationAttribute;
export type NoteType = "file" | "code" | "render";
export type Note = RenderNote | CodeNote | FileNote | AutoNote;
interface BaseNote {
title?: string;
type?: NoteType;
file: string;
attributes?: Record<Attribute, string>;
children?: Note[];
}
export interface RenderNote extends Omit<BaseNote, "file"> {
type: "render";
}
export interface AutoNote extends BaseNote {
type?: undefined;
file: string;
}
export interface CodeNote extends BaseNote {
type: "code";
file: string;
}
export interface FileNote extends BaseNote {
type: "file";
file: string;
}
export interface Config {
output: string;
notes: Note;
}
export interface PackOptions {
basePath?: string;
}
type PackFunction = (config: Config, opts: PackOptions) => void;
export default PackFunction;