UNPKG

1.09 kBTypeScriptView Raw
1export declare enum Markers {
2 start = "/**",
3 nostart = "/***",
4 delim = "*",
5 end = "*/"
6}
7export interface Block {
8 description: string;
9 tags: Spec[];
10 source: Line[];
11 problems: Problem[];
12}
13export interface Spec {
14 tag: string;
15 name: string;
16 default?: string;
17 type: string;
18 optional: boolean;
19 description: string;
20 problems: Problem[];
21 source: Line[];
22}
23export interface Line {
24 number: number;
25 source: string;
26 tokens: Tokens;
27}
28export interface Tokens {
29 start: string;
30 delimiter: string;
31 postDelimiter: string;
32 tag: string;
33 postTag: string;
34 name: string;
35 postName: string;
36 type: string;
37 postType: string;
38 description: string;
39 end: string;
40 lineEnd: string;
41}
42export interface Problem {
43 code: 'unhandled' | 'custom' | 'source:startline' | 'spec:tag:prefix' | 'spec:type:unpaired-curlies' | 'spec:name:unpaired-brackets' | 'spec:name:empty-name' | 'spec:name:invalid-default' | 'spec:name:empty-default';
44 message: string;
45 line: number;
46 critical: boolean;
47}