1 | import doctrine from 'doctrine';
|
2 | import * as TS from 'ts-simple-ast';
|
3 | import * as TJS from 'typescript-json-schema';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export interface Definition {
|
9 |
|
10 | title: string;
|
11 |
|
12 | description?: string;
|
13 |
|
14 | config: Config;
|
15 |
|
16 | version: string;
|
17 | params: {
|
18 |
|
19 | schema: TJS.Definition;
|
20 |
|
21 | order: string[];
|
22 |
|
23 | context: boolean;
|
24 | };
|
25 | returns: {
|
26 |
|
27 | schema: TJS.Definition;
|
28 |
|
29 | async: boolean;
|
30 | };
|
31 | }
|
32 | export interface Config {
|
33 | language: string;
|
34 | defaultExport: boolean;
|
35 | namedExport?: string;
|
36 | }
|
37 | export interface DefinitionOptions {
|
38 | emit?: boolean;
|
39 | emitOptions?: TS.EmitOptions;
|
40 | compilerOptions?: TS.CompilerOptions;
|
41 | jsonSchemaOptions?: TJS.PartialArgs;
|
42 | }
|
43 | export declare type PartialDefinitionOptions = Partial<DefinitionOptions>;
|
44 | export interface DefinitionBuilder {
|
45 | sourceFile: TS.SourceFile;
|
46 | main: TS.FunctionDeclaration;
|
47 | docs?: doctrine.Annotation;
|
48 | title: string;
|
49 | definition: Partial<Definition>;
|
50 | }
|