1 | import { SourceReference } from '../sources/file';
|
2 | import { Type } from '../types/index';
|
3 | import { Comment } from '../comments/comment';
|
4 | import { TypeParameterReflection } from './type-parameter';
|
5 | export declare function resetReflectionID(): void;
|
6 | export declare enum ReflectionKind {
|
7 | Global = 0,
|
8 | ExternalModule = 1,
|
9 | Module = 2,
|
10 | Enum = 4,
|
11 | EnumMember = 16,
|
12 | Variable = 32,
|
13 | Function = 64,
|
14 | Class = 128,
|
15 | Interface = 256,
|
16 | Constructor = 512,
|
17 | Property = 1024,
|
18 | Method = 2048,
|
19 | CallSignature = 4096,
|
20 | IndexSignature = 8192,
|
21 | ConstructorSignature = 16384,
|
22 | Parameter = 32768,
|
23 | TypeLiteral = 65536,
|
24 | TypeParameter = 131072,
|
25 | Accessor = 262144,
|
26 | GetSignature = 524288,
|
27 | SetSignature = 1048576,
|
28 | ObjectLiteral = 2097152,
|
29 | TypeAlias = 4194304,
|
30 | Event = 8388608,
|
31 | ClassOrInterface = 384,
|
32 | VariableOrProperty = 1056,
|
33 | FunctionOrMethod = 2112,
|
34 | SomeSignature = 1601536,
|
35 | SomeModule = 3,
|
36 | SomeType = 4391168,
|
37 | SomeValue = 2097248
|
38 | }
|
39 | export declare enum ReflectionFlag {
|
40 | None = 0,
|
41 | Private = 1,
|
42 | Protected = 2,
|
43 | Public = 4,
|
44 | Static = 8,
|
45 | Exported = 16,
|
46 | ExportAssignment = 32,
|
47 | External = 64,
|
48 | Optional = 128,
|
49 | DefaultValue = 256,
|
50 | Rest = 512,
|
51 | ConstructorProperty = 1024,
|
52 | Abstract = 2048,
|
53 | Const = 4096,
|
54 | Let = 8192
|
55 | }
|
56 | export declare class ReflectionFlags extends Array<string> {
|
57 | private flags;
|
58 | hasFlag(flag: ReflectionFlag): boolean;
|
59 | readonly isPrivate: boolean;
|
60 | readonly isProtected: boolean;
|
61 | readonly isPublic: boolean;
|
62 | readonly isStatic: boolean;
|
63 | readonly isExported: boolean;
|
64 | readonly isExternal: boolean;
|
65 | readonly isOptional: boolean;
|
66 | readonly isRest: boolean;
|
67 | readonly hasExportAssignment: boolean;
|
68 | readonly isConstructorProperty: boolean;
|
69 | readonly isAbstract: boolean;
|
70 | readonly isConst: boolean;
|
71 | readonly isLet: boolean;
|
72 | setFlag(flag: ReflectionFlag, set: boolean): void;
|
73 | private setSingleFlag;
|
74 | }
|
75 | export interface DefaultValueContainer extends Reflection {
|
76 | defaultValue?: string;
|
77 | }
|
78 | export interface TypeContainer extends Reflection {
|
79 | type?: Type;
|
80 | }
|
81 | export interface TypeParameterContainer extends Reflection {
|
82 | typeParameters?: TypeParameterReflection[];
|
83 | }
|
84 | export declare enum TraverseProperty {
|
85 | Children = 0,
|
86 | Parameters = 1,
|
87 | TypeLiteral = 2,
|
88 | TypeParameter = 3,
|
89 | Signatures = 4,
|
90 | IndexSignature = 5,
|
91 | GetSignature = 6,
|
92 | SetSignature = 7
|
93 | }
|
94 | export interface TraverseCallback {
|
95 | (reflection: Reflection, property: TraverseProperty): boolean | void;
|
96 | }
|
97 | export interface Decorator {
|
98 | name: string;
|
99 | type?: Type;
|
100 | arguments?: any;
|
101 | }
|
102 | export declare abstract class Reflection {
|
103 | id: number;
|
104 | name: string;
|
105 | originalName: string;
|
106 | kind: ReflectionKind;
|
107 | kindString?: string;
|
108 | flags: ReflectionFlags;
|
109 | parent?: Reflection;
|
110 | comment?: Comment;
|
111 | sources?: SourceReference[];
|
112 | decorators?: Decorator[];
|
113 | decorates?: Type[];
|
114 | url?: string;
|
115 | anchor?: string;
|
116 | hasOwnDocument?: boolean;
|
117 | cssClasses?: string;
|
118 | private _alias?;
|
119 | private _aliases?;
|
120 | constructor(name: string, kind: ReflectionKind, parent?: Reflection);
|
121 | kindOf(kind: ReflectionKind | ReflectionKind[]): boolean;
|
122 | getFullName(separator?: string): string;
|
123 | setFlag(flag: ReflectionFlag, value?: boolean): void;
|
124 | getAlias(): string;
|
125 | hasComment(): boolean;
|
126 | hasGetterOrSetter(): boolean;
|
127 | getChildByName(arg: string | string[]): Reflection | undefined;
|
128 | isProject(): boolean;
|
129 | findReflectionByName(arg: string | string[]): Reflection | undefined;
|
130 | traverse(callback: TraverseCallback): void;
|
131 | toObject(): any;
|
132 | toString(): string;
|
133 | toStringHierarchy(indent?: string): string;
|
134 | }
|