source: trip-planner-front/node_modules/@angular/compiler-cli/src/metadata/schema.d.ts

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 8.2 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/// <amd-module name="@angular/compiler-cli/src/metadata/schema" />
9export declare const METADATA_VERSION = 4;
10export declare type MetadataEntry = ClassMetadata | InterfaceMetadata | FunctionMetadata | MetadataValue;
11export interface ModuleMetadata {
12 __symbolic: 'module';
13 version: number;
14 exports?: ModuleExportMetadata[];
15 importAs?: string;
16 metadata: {
17 [name: string]: MetadataEntry;
18 };
19 origins?: {
20 [name: string]: string;
21 };
22}
23export declare function isModuleMetadata(value: any): value is ModuleMetadata;
24export interface ModuleExportMetadata {
25 export?: (string | {
26 name: string;
27 as: string;
28 })[];
29 from: string;
30}
31export interface ClassMetadata {
32 __symbolic: 'class';
33 extends?: MetadataSymbolicExpression | MetadataError;
34 arity?: number;
35 decorators?: (MetadataSymbolicExpression | MetadataError)[];
36 members?: MetadataMap;
37 statics?: {
38 [name: string]: MetadataValue | FunctionMetadata;
39 };
40}
41export declare function isClassMetadata(value: any): value is ClassMetadata;
42export interface InterfaceMetadata {
43 __symbolic: 'interface';
44}
45export declare function isInterfaceMetadata(value: any): value is InterfaceMetadata;
46export interface MetadataMap {
47 [name: string]: MemberMetadata[];
48}
49export interface MemberMetadata {
50 __symbolic: 'constructor' | 'method' | 'property';
51 decorators?: (MetadataSymbolicExpression | MetadataError)[];
52 parameters?: (MetadataSymbolicExpression | MetadataError | null | undefined)[];
53}
54export declare function isMemberMetadata(value: any): value is MemberMetadata;
55export interface MethodMetadata extends MemberMetadata {
56 __symbolic: 'constructor' | 'method';
57 parameterDecorators?: ((MetadataSymbolicExpression | MetadataError)[] | undefined)[];
58}
59export declare function isMethodMetadata(value: any): value is MethodMetadata;
60export interface ConstructorMetadata extends MethodMetadata {
61 __symbolic: 'constructor';
62 parameters?: (MetadataSymbolicExpression | MetadataError | null | undefined)[];
63}
64export declare function isConstructorMetadata(value: any): value is ConstructorMetadata;
65export interface FunctionMetadata {
66 __symbolic: 'function';
67 parameters: string[];
68 defaults?: MetadataValue[];
69 value: MetadataValue;
70}
71export declare function isFunctionMetadata(value: any): value is FunctionMetadata;
72export declare type MetadataValue = string | number | boolean | undefined | null | MetadataObject | MetadataArray | MetadataSymbolicExpression | MetadataSymbolicReferenceExpression | MetadataSymbolicBinaryExpression | MetadataSymbolicIndexExpression | MetadataSymbolicCallExpression | MetadataSymbolicPrefixExpression | MetadataSymbolicIfExpression | MetadataSymbolicSpreadExpression | MetadataSymbolicSelectExpression | MetadataError;
73export interface MetadataObject {
74 [name: string]: MetadataValue;
75}
76export interface MetadataArray {
77 [name: number]: MetadataValue;
78}
79export declare type MetadataSymbolicExpression = MetadataSymbolicBinaryExpression | MetadataSymbolicIndexExpression | MetadataSymbolicIndexExpression | MetadataSymbolicCallExpression | MetadataSymbolicCallExpression | MetadataSymbolicPrefixExpression | MetadataSymbolicIfExpression | MetadataGlobalReferenceExpression | MetadataModuleReferenceExpression | MetadataImportedSymbolReferenceExpression | MetadataImportedDefaultReferenceExpression | MetadataSymbolicSelectExpression | MetadataSymbolicSpreadExpression;
80export declare function isMetadataSymbolicExpression(value: any): value is MetadataSymbolicExpression;
81export interface MetadataSymbolicBinaryExpression {
82 __symbolic: 'binary';
83 operator: '&&' | '||' | '|' | '^' | '&' | '==' | '!=' | '===' | '!==' | '<' | '>' | '<=' | '>=' | 'instanceof' | 'in' | 'as' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' | '**' | '??';
84 left: MetadataValue;
85 right: MetadataValue;
86}
87export declare function isMetadataSymbolicBinaryExpression(value: any): value is MetadataSymbolicBinaryExpression;
88export interface MetadataSymbolicIndexExpression {
89 __symbolic: 'index';
90 expression: MetadataValue;
91 index: MetadataValue;
92}
93export declare function isMetadataSymbolicIndexExpression(value: any): value is MetadataSymbolicIndexExpression;
94export interface MetadataSymbolicCallExpression {
95 __symbolic: 'call' | 'new';
96 expression: MetadataValue;
97 arguments?: MetadataValue[];
98}
99export declare function isMetadataSymbolicCallExpression(value: any): value is MetadataSymbolicCallExpression;
100export interface MetadataSymbolicPrefixExpression {
101 __symbolic: 'pre';
102 operator: '+' | '-' | '~' | '!';
103 operand: MetadataValue;
104}
105export declare function isMetadataSymbolicPrefixExpression(value: any): value is MetadataSymbolicPrefixExpression;
106export interface MetadataSymbolicIfExpression {
107 __symbolic: 'if';
108 condition: MetadataValue;
109 thenExpression: MetadataValue;
110 elseExpression: MetadataValue;
111}
112export declare function isMetadataSymbolicIfExpression(value: any): value is MetadataSymbolicIfExpression;
113export interface MetadataSourceLocationInfo {
114 /**
115 * The line number of the error in the .ts file the metadata was created for.
116 */
117 line?: number;
118 /**
119 * The number of utf8 code-units from the beginning of the file of the error.
120 */
121 character?: number;
122}
123export interface MetadataGlobalReferenceExpression extends MetadataSourceLocationInfo {
124 __symbolic: 'reference';
125 name: string;
126 arguments?: MetadataValue[];
127}
128export declare function isMetadataGlobalReferenceExpression(value: any): value is MetadataGlobalReferenceExpression;
129export interface MetadataModuleReferenceExpression extends MetadataSourceLocationInfo {
130 __symbolic: 'reference';
131 module: string;
132}
133export declare function isMetadataModuleReferenceExpression(value: any): value is MetadataModuleReferenceExpression;
134export interface MetadataImportedSymbolReferenceExpression extends MetadataSourceLocationInfo {
135 __symbolic: 'reference';
136 module: string;
137 name: string;
138 arguments?: MetadataValue[];
139}
140export declare function isMetadataImportedSymbolReferenceExpression(value: any): value is MetadataImportedSymbolReferenceExpression;
141export interface MetadataImportedDefaultReferenceExpression extends MetadataSourceLocationInfo {
142 __symbolic: 'reference';
143 module: string;
144 default: boolean;
145 arguments?: MetadataValue[];
146}
147export declare function isMetadataImportDefaultReference(value: any): value is MetadataImportedDefaultReferenceExpression;
148export declare type MetadataSymbolicReferenceExpression = MetadataGlobalReferenceExpression | MetadataModuleReferenceExpression | MetadataImportedSymbolReferenceExpression | MetadataImportedDefaultReferenceExpression;
149export declare function isMetadataSymbolicReferenceExpression(value: any): value is MetadataSymbolicReferenceExpression;
150export interface MetadataSymbolicSelectExpression {
151 __symbolic: 'select';
152 expression: MetadataValue;
153 member: string;
154}
155export declare function isMetadataSymbolicSelectExpression(value: any): value is MetadataSymbolicSelectExpression;
156export interface MetadataSymbolicSpreadExpression {
157 __symbolic: 'spread';
158 expression: MetadataValue;
159}
160export declare function isMetadataSymbolicSpreadExpression(value: any): value is MetadataSymbolicSpreadExpression;
161export interface MetadataError extends MetadataSourceLocationInfo {
162 __symbolic: 'error';
163 /**
164 * This message should be short and relatively discriptive and should be fixed once it is created.
165 * If the reader doesn't recognize the message, it will display the message unmodified. If the
166 * reader recognizes the error message is it free to use substitute message the is more
167 * descriptive and/or localized.
168 */
169 message: string;
170 /**
171 * The module of the error (only used in bundled metadata)
172 */
173 module?: string;
174 /**
175 * Context information that can be used to generate a more descriptive error message. The content
176 * of the context is dependent on the error message.
177 */
178 context?: {
179 [name: string]: string;
180 };
181}
182export declare function isMetadataError(value: any): value is MetadataError;
Note: See TracBrowser for help on using the repository browser.