UNPKG

1.75 kBTypeScriptView Raw
1export interface BiblioData {
2 [namespace: string]: BiblioEntry[];
3}
4export interface BiblioEntryBase {
5 type: string;
6 location: string;
7 namespace?: string;
8 id?: string;
9 aoid?: string | null;
10 refId?: string;
11 clauseId?: string;
12 name?: string;
13 title?: string;
14 number?: string | number;
15 caption?: string;
16 term?: string;
17 referencingIds: string[];
18}
19export interface AlgorithmBiblioEntry extends BiblioEntryBase {
20 type: 'op';
21 aoid: string;
22 refId?: string;
23}
24export interface ProductionBiblioEntry extends BiblioEntryBase {
25 type: 'production';
26 id?: string;
27 name: string;
28}
29export interface ClauseBiblioEntry extends BiblioEntryBase {
30 type: 'clause';
31 id: string;
32 aoid: string | null;
33 title: string;
34 titleHTML: string;
35 number: string | number;
36}
37export interface TermBiblioEntry extends BiblioEntryBase {
38 type: 'term';
39 term: string;
40 refId: string;
41 variants?: string[];
42 id?: string;
43}
44export interface FigureBiblioEntry extends BiblioEntryBase {
45 type: 'table' | 'figure' | 'example' | 'note';
46 id: string;
47 node: HTMLElement;
48 number: string | number;
49 clauseId?: string;
50 caption?: string;
51}
52export interface StepBiblioEntry extends BiblioEntryBase {
53 type: 'step';
54 id: string;
55 stepNumbers: number[];
56}
57export declare type BiblioEntry = AlgorithmBiblioEntry | ProductionBiblioEntry | ClauseBiblioEntry | TermBiblioEntry | FigureBiblioEntry | StepBiblioEntry;
58declare type Unkey<T> = T extends any ? Omit<T, 'key' | 'keys' | 'location' | 'referencingIds'> : never;
59export declare type PartialBiblioEntry = Unkey<BiblioEntry>;
60export declare function getKeys(entry: TermBiblioEntry): string[];
61export {};