1 |
|
2 |
|
3 |
|
4 |
|
5 | declare function parse(source: string): parse.Info;
|
6 |
|
7 | declare namespace parse {
|
8 | type Info = LicenseInfo | ConjunctionInfo;
|
9 |
|
10 | interface LicenseInfo {
|
11 | license: string;
|
12 | plus?: true | undefined;
|
13 | }
|
14 |
|
15 | interface ConjunctionInfo {
|
16 | conjunction: "and" | "or";
|
17 | left: LicenseInfo | ConjunctionInfo;
|
18 | right: LicenseInfo | ConjunctionInfo;
|
19 | }
|
20 |
|
21 | interface Token {
|
22 | type: "OPERATOR" | "LICENSE" | "DOCUMENTREF" | "LICENSEREF" | "EXCEPTION";
|
23 | string: string;
|
24 | }
|
25 | }
|
26 |
|
27 | export = parse;
|