-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdoc-interfaces.ts
167 lines (145 loc) · 3.59 KB
/
doc-interfaces.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import {
ResourceIdentifierObject,
ResourceObject,
AttributesObject,
RelationshipEntry,
RelationshipsObject
} from './json-api-interfaces';
import {
MenuConfig
} from './cli-interfaces';
import { SourceReference } from 'typedoc/dist/lib/models/sources/file';
import { SourceDirectory } from 'typedoc/dist/lib/models/sources/directory';
import { Comment } from 'typedoc/dist/lib/models/comments/comment';
export interface OutputRoot {
data: {
id: string;
type: string;
attributes: RootAttributes,
relationships: {
docmodules: {
data: ResourceIdentifierObject[]
}
}
},
included: TSResource[]
}
export interface RootAttributes extends DocSetManifest {
idMap: ProjectIdMap
}
export interface ModuleIdMap {
[index: string]: string;
}
export interface ProjectIdMap {
[index: string]: ModuleIdMap;
}
export interface DocSetManifest {
header?: string;
title: string;
intro: string;
}
export interface DocSetJsonApi {
data?: ResourceObject | ResourceObject[] | ResourceIdentifierObject | ResourceIdentifierObject[];
included?: Array<ResourceObject>;
}
export interface TypeDocFilesJson {
name: string,
id: number,
kind: number,
flags: Object,
children: any[]
groups: any[]
}
export interface ProjectDoc extends ResourceObject {
attributes: {
name: string;
}
}
export interface ProjectObject {
roots: ResourceIdentifierObject[],
resources: ResourceObject[]
}
export interface TSRelationshipsObject extends RelationshipsObject {
classes?: RelationshipEntry;
interfaces?: RelationshipEntry;
}
export interface TSResource extends ResourceObject {
attributes: TSAttributesObject;
relationships?: TSRelationshipsObject;
}
export type TSResourceIdentifierObject = ResourceIdentifierObject;
export interface TSType {
name: string;
link?: TSTypeLink;
declaration?: TSResource;
types?: TSType[]
}
export interface TSAttributesObject {
kindString: string;
slug: string;
alias: string;
flags: TSResourceFlags;
name: string;
menu?: MenuConfig;
comment?: Comment;
sources?: SourceReference[];
typeInfo?: TSType;
packageInfo?: Object;
readme?: string;
implementedTypes?: TSType[];
extendedTypes?: TSType[];
fullName?: string;
hierarchy?: string;
constructors?: TSAttributesObject[];
callSignatures?: TSAttributesObject[];
properties?: TSAttributesObject[];
parameters?: TSAttributesObject[];
typeLiterals?: TSAttributesObject[];
interfaces?: TSAttributesObject[];
constructorSignatures?: TSAttributesObject[];
accessors?: TSAttributesObject[];
getSignatures?: TSAttributesObject[];
indexSignatures?: TSAttributesObject[];
typeAliases?: TSAttributesObject[];
methods?: TSAttributesObject[];
variables?: TSAttributesObject[];
functions?: TSAttributesObject[];
objectLiterals?: TSAttributesObject[];
typeParameters?: TSAttributesObject[];
}
export interface TSResourceFlags {
isPrivate: boolean;
isProtected: boolean;
isPublic: boolean;
isStatic: boolean;
isExported: boolean;
isExternal: boolean;
isOptional: boolean;
isRest: boolean;
isNormalized: boolean;
}
export interface TSTypeLink {
id: string,
type: string;
slug: string;
sources: SourceReference[],
parent?: TSTypeLink
};
export type TSRelationship = 'interfaces' | 'classs';
export type TSChild = 'callSignatures' |
'parameters' |
'typeLiterals' |
'callSignatures' |
'constructors' |
'interfaces' |
'constructorSignatures' |
'typeAliases' |
'indexSignatures' |
'methods' |
'properties' |
'variables' |
'functions' |
'objectLiterals' |
'typeParameters' |
'accessors' |
'getSignatures';