UNPKG

3.96 kBTypeScriptView Raw
1export interface ReflectionContainer {
2 id: number;
3 name: string;
4 kind: number;
5 kindString: string;
6 flags: ReflectionFlagsObject;
7 originalName?: string;
8}
9export interface DefaultValueContainer {
10 defaultValue: string;
11}
12export interface TypeContainer {
13 type: TypeObject;
14}
15export interface TypeParameterContainer {
16 typeParameters: TypeContainer[];
17}
18export interface DecoratesContainer {
19 decorates: TypeObject[];
20}
21export interface DecoratorsContainer<T> {
22 decorators: T[];
23}
24export interface SourceReferenceContainer<T> {
25 sources: T[];
26}
27export interface GroupsContainer<T> {
28 groups: T[];
29}
30export interface CategoriesContainer<T> {
31 categories: T[];
32}
33export interface ContainerReflectionContainer<TChildren> {
34 children: TChildren[];
35}
36export interface CommentContainer<TComment> {
37 comment: TComment;
38}
39export interface SignatureReflectionContainer<TParameters> {
40 overwrites?: TypeObject;
41 inheritedFrom?: TypeObject;
42 implementationOf?: TypeObject;
43 parameters?: TParameters[];
44}
45export interface DeclarationReflectionContainer<T> {
46 signatures?: T[];
47 indexSignature?: T[];
48 getSignature?: T[];
49 setSignature?: T[];
50 extendedTypes?: TypeObject[];
51 extendedBy?: TypeObject[];
52 implementedTypes?: TypeObject[];
53 implementedBy?: TypeObject[];
54}
55export interface ReflectionObject extends ReflectionContainer, Partial<CommentContainer<CommentObject>>, Partial<DecoratesContainer>, Partial<DecoratorsContainer<DecoratorObject>> {
56}
57export interface ParameterReflectionObject extends ReflectionObject, TypeContainer, DefaultValueContainer {
58}
59export interface ContainerReflectionObject extends ReflectionObject, Partial<SourceReferenceContainer<SourceReferenceObject>>, Partial<GroupsContainer<ReflectionGroupObject>>, Partial<CategoriesContainer<ReflectionCategoryObject>>, ContainerReflectionContainer<ReflectionObject> {
60}
61export interface DeclarationReflectionObject extends ContainerReflectionObject, DefaultValueContainer, Partial<TypeContainer>, Partial<TypeParameterContainer>, Partial<SignatureReflectionContainer<ParameterReflectionObject>>, DeclarationReflectionContainer<SignatureReflectionObject> {
62}
63export interface SignatureReflectionObject extends ReflectionObject, Partial<SignatureReflectionContainer<ParameterReflectionObject>>, Partial<TypeContainer>, Partial<TypeParameterContainer> {
64}
65export interface CommentObject {
66 shortText?: string;
67 text?: string;
68 returns?: string;
69 tags?: CommentTagObject[];
70}
71export interface CommentTagObject {
72 tag: string;
73 text: string;
74 param?: string;
75}
76export interface DecoratorObject {
77 name: string;
78 type?: TypeObject;
79 arguments?: any;
80}
81export interface ProjectReflectionObject extends ContainerReflectionObject {
82}
83export interface SourceReferenceObject {
84 fileName: string;
85 line: number;
86 character: number;
87}
88export interface TypeObject {
89 type: 'void' | 'array' | 'intersection' | 'intrinsic' | 'reference' | 'reflection' | 'stringLiteral' | 'tuple' | 'typeParameter' | 'union' | 'unknown' | string;
90 elementType?: TypeObject;
91 types?: TypeObject[];
92 name?: 'Object' | 'string' | 'number' | 'boolean' | 'this' | string;
93 id?: number;
94 typeArguments?: TypeObject[];
95 declaration?: ReflectionObject;
96 value?: string;
97 elements?: TypeObject[];
98 constraint?: TypeObject;
99}
100export interface ReflectionGroupObject {
101 title: string;
102 kind: number;
103 children?: number[];
104 categories?: ReflectionCategoryObject[];
105}
106export interface ReflectionCategoryObject {
107 title: string;
108 children?: number[];
109}
110export interface ReflectionFlagsObject {
111 isPrivate?: boolean;
112 isProtected?: boolean;
113 isPublic?: boolean;
114 isStatic?: boolean;
115 isExported?: boolean;
116 isExternal?: boolean;
117 isOptional?: boolean;
118 isRest?: boolean;
119 hasExportAssignment?: boolean;
120 isConstructorProperty?: boolean;
121}