@rspack/core 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/@swc/types/index.d.ts +349 -258
- package/compiled/enhanced-resolve/package.json +1 -1
- package/compiled/zod/index.d.ts +302 -265
- package/compiled/zod/index.js +238 -84
- package/compiled/zod/package.json +1 -1
- package/dist/Chunk.d.ts +2 -0
- package/dist/ChunkGraph.d.ts +3 -0
- package/dist/ChunkGroup.d.ts +1 -0
- package/dist/Compilation.d.ts +0 -6
- package/dist/Dependency.d.ts +1 -0
- package/dist/Module.d.ts +6 -1
- package/dist/ModuleGraph.d.ts +4 -0
- package/dist/ModuleGraphConnection.d.ts +2 -0
- package/dist/NormalModuleFactory.d.ts +4 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +19 -3
- package/dist/builtin-plugin/RsdoctorPlugin.d.ts +45 -0
- package/dist/builtin-plugin/html-plugin/options.d.ts +26 -20
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/builtin-plugin/lazy-compilation/backend.d.ts +10 -1
- package/dist/config/defaults.d.ts +1 -0
- package/dist/config/types.d.ts +4 -0
- package/dist/config/zod.d.ts +40 -22
- package/dist/exports.d.ts +4 -1
- package/dist/index.js +6163 -5935
- package/dist/lib/DllReferencePlugin.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1,8 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
interface Assumptions {
|
|
2
|
+
/**
|
|
3
|
+
* https://babeljs.io/docs/en/assumptions#arraylikeisiterable
|
|
4
|
+
*/
|
|
5
|
+
arrayLikeIsIterable?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* https://babeljs.io/docs/en/assumptions#constantreexports
|
|
8
|
+
*/
|
|
9
|
+
constantReexports?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* https://babeljs.io/docs/en/assumptions#constantsuper
|
|
12
|
+
*/
|
|
13
|
+
constantSuper?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* https://babeljs.io/docs/en/assumptions#enumerablemodulemeta
|
|
16
|
+
*/
|
|
17
|
+
enumerableModuleMeta?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* https://babeljs.io/docs/en/assumptions#ignorefunctionlength
|
|
20
|
+
*/
|
|
21
|
+
ignoreFunctionLength?: boolean;
|
|
22
|
+
ignoreFunctionName?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* https://babeljs.io/docs/en/assumptions#ignoretoprimitivehint
|
|
25
|
+
*/
|
|
26
|
+
ignoreToPrimitiveHint?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* https://babeljs.io/docs/en/assumptions#iterableisarray
|
|
29
|
+
*/
|
|
30
|
+
iterableIsArray?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* https://babeljs.io/docs/en/assumptions#mutabletemplateobject
|
|
33
|
+
*/
|
|
34
|
+
mutableTemplateObject?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* https://babeljs.io/docs/en/assumptions#noclasscalls
|
|
37
|
+
*/
|
|
38
|
+
noClassCalls?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* https://babeljs.io/docs/en/assumptions#nodocumentall
|
|
41
|
+
*/
|
|
42
|
+
noDocumentAll?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* https://babeljs.io/docs/en/assumptions#noincompletensimportdetection
|
|
45
|
+
*/
|
|
46
|
+
noIncompleteNsImportDetection?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* https://babeljs.io/docs/en/assumptions#nonewarrows
|
|
49
|
+
*/
|
|
50
|
+
noNewArrows?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* https://babeljs.io/docs/en/assumptions#objectrestnosymbols
|
|
53
|
+
*/
|
|
54
|
+
objectRestNoSymbols?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* https://babeljs.io/docs/en/assumptions#privatefieldsasproperties
|
|
57
|
+
*/
|
|
58
|
+
privateFieldsAsProperties?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* https://babeljs.io/docs/en/assumptions#puregetters
|
|
61
|
+
*/
|
|
62
|
+
pureGetters?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* https://babeljs.io/docs/en/assumptions#setclassmethods
|
|
65
|
+
*/
|
|
66
|
+
setClassMethods?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* https://babeljs.io/docs/en/assumptions#setcomputedproperties
|
|
69
|
+
*/
|
|
70
|
+
setComputedProperties?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* https://babeljs.io/docs/en/assumptions#setpublicclassfields
|
|
73
|
+
*/
|
|
74
|
+
setPublicClassFields?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* https://babeljs.io/docs/en/assumptions#setspreadproperties
|
|
77
|
+
*/
|
|
78
|
+
setSpreadProperties?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* https://babeljs.io/docs/en/assumptions#skipforofiteratorclosing
|
|
81
|
+
*/
|
|
82
|
+
skipForOfIteratorClosing?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* https://babeljs.io/docs/en/assumptions#superiscallableconstructor
|
|
85
|
+
*/
|
|
86
|
+
superIsCallableConstructor?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated This value will be always true
|
|
89
|
+
*/
|
|
90
|
+
tsEnumIsReadonly?: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface Plugin {
|
|
3
94
|
(module: Program): Program;
|
|
4
95
|
}
|
|
5
|
-
|
|
96
|
+
type ParseOptions = ParserConfig & {
|
|
6
97
|
comments?: boolean;
|
|
7
98
|
script?: boolean;
|
|
8
99
|
/**
|
|
@@ -10,8 +101,8 @@ export type ParseOptions = ParserConfig & {
|
|
|
10
101
|
*/
|
|
11
102
|
target?: JscTarget;
|
|
12
103
|
};
|
|
13
|
-
|
|
14
|
-
|
|
104
|
+
type TerserEcmaVersion = 5 | 2015 | 2016 | string | number;
|
|
105
|
+
interface JsMinifyOptions {
|
|
15
106
|
compress?: TerserCompressOptions | boolean;
|
|
16
107
|
format?: JsFormatOptions & ToSnakeCaseProperties<JsFormatOptions>;
|
|
17
108
|
mangle?: TerserMangleOptions | boolean;
|
|
@@ -40,7 +131,7 @@ type ToSnakeCaseProperties<T> = {
|
|
|
40
131
|
* but it exists to support passing terser config to swc minify
|
|
41
132
|
* without modification.
|
|
42
133
|
*/
|
|
43
|
-
|
|
134
|
+
interface JsFormatOptions {
|
|
44
135
|
/**
|
|
45
136
|
* Currently noop.
|
|
46
137
|
* @default false
|
|
@@ -145,7 +236,7 @@ export interface JsFormatOptions {
|
|
|
145
236
|
*/
|
|
146
237
|
wrapFuncArgs?: boolean;
|
|
147
238
|
}
|
|
148
|
-
|
|
239
|
+
interface TerserCompressOptions {
|
|
149
240
|
arguments?: boolean;
|
|
150
241
|
arrows?: boolean;
|
|
151
242
|
booleans?: boolean;
|
|
@@ -203,7 +294,7 @@ export interface TerserCompressOptions {
|
|
|
203
294
|
const_to_let?: boolean;
|
|
204
295
|
module?: boolean;
|
|
205
296
|
}
|
|
206
|
-
|
|
297
|
+
interface TerserMangleOptions {
|
|
207
298
|
props?: TerserManglePropertiesOptions;
|
|
208
299
|
/**
|
|
209
300
|
* Pass `true` to mangle names declared in the top level scope.
|
|
@@ -241,12 +332,12 @@ export interface TerserMangleOptions {
|
|
|
241
332
|
safari10?: boolean;
|
|
242
333
|
reserved?: string[];
|
|
243
334
|
}
|
|
244
|
-
|
|
335
|
+
interface TerserManglePropertiesOptions {
|
|
245
336
|
}
|
|
246
337
|
/**
|
|
247
338
|
* Programmatic options.
|
|
248
339
|
*/
|
|
249
|
-
|
|
340
|
+
interface Options extends Config {
|
|
250
341
|
/**
|
|
251
342
|
* If true, a file is parsed as a script instead of module.
|
|
252
343
|
*/
|
|
@@ -400,15 +491,15 @@ export interface Options extends Config {
|
|
|
400
491
|
*/
|
|
401
492
|
outputPath?: string;
|
|
402
493
|
}
|
|
403
|
-
|
|
494
|
+
interface CallerOptions {
|
|
404
495
|
name: string;
|
|
405
496
|
[key: string]: any;
|
|
406
497
|
}
|
|
407
|
-
|
|
498
|
+
type Swcrc = Config | Config[];
|
|
408
499
|
/**
|
|
409
500
|
* .swcrc
|
|
410
501
|
*/
|
|
411
|
-
|
|
502
|
+
interface Config {
|
|
412
503
|
/**
|
|
413
504
|
* Note: The type is string because it follows rust's regex syntax.
|
|
414
505
|
*/
|
|
@@ -438,7 +529,7 @@ export interface Config {
|
|
|
438
529
|
/**
|
|
439
530
|
* Configuration ported from babel-preset-env
|
|
440
531
|
*/
|
|
441
|
-
|
|
532
|
+
interface EnvConfig {
|
|
442
533
|
mode?: "usage" | "entry";
|
|
443
534
|
debug?: boolean;
|
|
444
535
|
dynamicImport?: boolean;
|
|
@@ -465,7 +556,7 @@ export interface EnvConfig {
|
|
|
465
556
|
*/
|
|
466
557
|
forceAllTransforms?: boolean;
|
|
467
558
|
}
|
|
468
|
-
|
|
559
|
+
interface JscConfig {
|
|
469
560
|
assumptions?: Assumptions;
|
|
470
561
|
loose?: boolean;
|
|
471
562
|
/**
|
|
@@ -545,9 +636,9 @@ export interface JscConfig {
|
|
|
545
636
|
minify?: JsMinifyOptions;
|
|
546
637
|
preserveAllComments?: boolean;
|
|
547
638
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
639
|
+
type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "esnext";
|
|
640
|
+
type ParserConfig = TsParserConfig | EsParserConfig;
|
|
641
|
+
interface TsParserConfig {
|
|
551
642
|
syntax: "typescript";
|
|
552
643
|
/**
|
|
553
644
|
* Defaults to `false`.
|
|
@@ -562,7 +653,7 @@ export interface TsParserConfig {
|
|
|
562
653
|
*/
|
|
563
654
|
dynamicImport?: boolean;
|
|
564
655
|
}
|
|
565
|
-
|
|
656
|
+
interface EsParserConfig {
|
|
566
657
|
syntax: "ecmascript";
|
|
567
658
|
/**
|
|
568
659
|
* Defaults to false.
|
|
@@ -652,7 +743,7 @@ export interface EsParserConfig {
|
|
|
652
743
|
/**
|
|
653
744
|
* Options for transform.
|
|
654
745
|
*/
|
|
655
|
-
|
|
746
|
+
interface TransformConfig {
|
|
656
747
|
/**
|
|
657
748
|
* Effective only if `syntax` supports ƒ.
|
|
658
749
|
*/
|
|
@@ -677,7 +768,7 @@ export interface TransformConfig {
|
|
|
677
768
|
treatConstEnumAsEnum?: boolean;
|
|
678
769
|
useDefineForClassFields?: boolean;
|
|
679
770
|
}
|
|
680
|
-
|
|
771
|
+
interface ReactConfig {
|
|
681
772
|
/**
|
|
682
773
|
* Replace the function used when compiling JSX expressions.
|
|
683
774
|
*
|
|
@@ -731,14 +822,14 @@ export interface ReactConfig {
|
|
|
731
822
|
*
|
|
732
823
|
* See: https://github.com/swc-project/swc/issues/18#issuecomment-466272558
|
|
733
824
|
*/
|
|
734
|
-
|
|
825
|
+
interface ConstModulesConfig {
|
|
735
826
|
globals?: {
|
|
736
827
|
[module: string]: {
|
|
737
828
|
[name: string]: string;
|
|
738
829
|
};
|
|
739
830
|
};
|
|
740
831
|
}
|
|
741
|
-
|
|
832
|
+
interface OptimizerConfig {
|
|
742
833
|
simplify?: boolean;
|
|
743
834
|
globals?: GlobalPassOption;
|
|
744
835
|
jsonify?: {
|
|
@@ -748,7 +839,7 @@ export interface OptimizerConfig {
|
|
|
748
839
|
/**
|
|
749
840
|
* Options for inline-global pass.
|
|
750
841
|
*/
|
|
751
|
-
|
|
842
|
+
interface GlobalPassOption {
|
|
752
843
|
/**
|
|
753
844
|
* Global variables that should be inlined with passed value.
|
|
754
845
|
*
|
|
@@ -768,8 +859,8 @@ export interface GlobalPassOption {
|
|
|
768
859
|
*/
|
|
769
860
|
typeofs?: Record<string, string>;
|
|
770
861
|
}
|
|
771
|
-
|
|
772
|
-
|
|
862
|
+
type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig;
|
|
863
|
+
interface BaseModuleConfig {
|
|
773
864
|
/**
|
|
774
865
|
* By default, when using exports with babel a non-enumerable `__esModule`
|
|
775
866
|
* property is exported. In some cases this property is used to determine
|
|
@@ -937,30 +1028,30 @@ export interface BaseModuleConfig {
|
|
|
937
1028
|
allowTopLevelThis?: boolean;
|
|
938
1029
|
preserveImportMeta?: boolean;
|
|
939
1030
|
}
|
|
940
|
-
|
|
1031
|
+
interface Es6Config extends BaseModuleConfig {
|
|
941
1032
|
type: "es6";
|
|
942
1033
|
}
|
|
943
|
-
|
|
1034
|
+
interface NodeNextConfig extends BaseModuleConfig {
|
|
944
1035
|
type: "nodenext";
|
|
945
1036
|
}
|
|
946
|
-
|
|
1037
|
+
interface CommonJsConfig extends BaseModuleConfig {
|
|
947
1038
|
type: "commonjs";
|
|
948
1039
|
}
|
|
949
|
-
|
|
1040
|
+
interface UmdConfig extends BaseModuleConfig {
|
|
950
1041
|
type: "umd";
|
|
951
1042
|
globals?: {
|
|
952
1043
|
[key: string]: string;
|
|
953
1044
|
};
|
|
954
1045
|
}
|
|
955
|
-
|
|
1046
|
+
interface AmdConfig extends BaseModuleConfig {
|
|
956
1047
|
type: "amd";
|
|
957
1048
|
moduleId?: string;
|
|
958
1049
|
}
|
|
959
|
-
|
|
1050
|
+
interface SystemjsConfig {
|
|
960
1051
|
type: "systemjs";
|
|
961
1052
|
allowTopLevelThis?: boolean;
|
|
962
1053
|
}
|
|
963
|
-
|
|
1054
|
+
interface Output {
|
|
964
1055
|
/**
|
|
965
1056
|
* Transformed code
|
|
966
1057
|
*/
|
|
@@ -970,23 +1061,23 @@ export interface Output {
|
|
|
970
1061
|
*/
|
|
971
1062
|
map?: string;
|
|
972
1063
|
}
|
|
973
|
-
|
|
1064
|
+
interface MatchPattern {
|
|
974
1065
|
}
|
|
975
|
-
|
|
1066
|
+
interface Span {
|
|
976
1067
|
start: number;
|
|
977
1068
|
end: number;
|
|
978
1069
|
ctxt: number;
|
|
979
1070
|
}
|
|
980
|
-
|
|
1071
|
+
interface Node {
|
|
981
1072
|
type: string;
|
|
982
1073
|
}
|
|
983
|
-
|
|
1074
|
+
interface HasSpan {
|
|
984
1075
|
span: Span;
|
|
985
1076
|
}
|
|
986
|
-
|
|
1077
|
+
interface HasDecorator {
|
|
987
1078
|
decorators?: Decorator[];
|
|
988
1079
|
}
|
|
989
|
-
|
|
1080
|
+
interface Class extends HasSpan, HasDecorator {
|
|
990
1081
|
body: ClassMember[];
|
|
991
1082
|
superClass?: Expression;
|
|
992
1083
|
isAbstract: boolean;
|
|
@@ -994,8 +1085,8 @@ export interface Class extends HasSpan, HasDecorator {
|
|
|
994
1085
|
superTypeParams?: TsTypeParameterInstantiation;
|
|
995
1086
|
implements: TsExpressionWithTypeArguments[];
|
|
996
1087
|
}
|
|
997
|
-
|
|
998
|
-
|
|
1088
|
+
type ClassMember = Constructor | ClassMethod | PrivateMethod | ClassProperty | PrivateProperty | TsIndexSignature | EmptyStatement | StaticBlock;
|
|
1089
|
+
interface ClassPropertyBase extends Node, HasSpan, HasDecorator {
|
|
999
1090
|
value?: Expression;
|
|
1000
1091
|
typeAnnotation?: TsTypeAnnotation;
|
|
1001
1092
|
isStatic: boolean;
|
|
@@ -1005,21 +1096,21 @@ export interface ClassPropertyBase extends Node, HasSpan, HasDecorator {
|
|
|
1005
1096
|
readonly: boolean;
|
|
1006
1097
|
definite: boolean;
|
|
1007
1098
|
}
|
|
1008
|
-
|
|
1099
|
+
interface ClassProperty extends ClassPropertyBase {
|
|
1009
1100
|
type: "ClassProperty";
|
|
1010
1101
|
key: PropertyName;
|
|
1011
1102
|
isAbstract: boolean;
|
|
1012
1103
|
declare: boolean;
|
|
1013
1104
|
}
|
|
1014
|
-
|
|
1105
|
+
interface PrivateProperty extends ClassPropertyBase {
|
|
1015
1106
|
type: "PrivateProperty";
|
|
1016
1107
|
key: PrivateName;
|
|
1017
1108
|
}
|
|
1018
|
-
|
|
1109
|
+
interface Param extends Node, HasSpan, HasDecorator {
|
|
1019
1110
|
type: "Parameter";
|
|
1020
1111
|
pat: Pattern;
|
|
1021
1112
|
}
|
|
1022
|
-
|
|
1113
|
+
interface Constructor extends Node, HasSpan {
|
|
1023
1114
|
type: "Constructor";
|
|
1024
1115
|
key: PropertyName;
|
|
1025
1116
|
params: (TsParameterProperty | Param)[];
|
|
@@ -1027,7 +1118,7 @@ export interface Constructor extends Node, HasSpan {
|
|
|
1027
1118
|
accessibility?: Accessibility;
|
|
1028
1119
|
isOptional: boolean;
|
|
1029
1120
|
}
|
|
1030
|
-
|
|
1121
|
+
interface ClassMethodBase extends Node, HasSpan {
|
|
1031
1122
|
function: Fn;
|
|
1032
1123
|
kind: MethodKind;
|
|
1033
1124
|
isStatic: boolean;
|
|
@@ -1036,56 +1127,56 @@ export interface ClassMethodBase extends Node, HasSpan {
|
|
|
1036
1127
|
isOptional: boolean;
|
|
1037
1128
|
isOverride: boolean;
|
|
1038
1129
|
}
|
|
1039
|
-
|
|
1130
|
+
interface ClassMethod extends ClassMethodBase {
|
|
1040
1131
|
type: "ClassMethod";
|
|
1041
1132
|
key: PropertyName;
|
|
1042
1133
|
}
|
|
1043
|
-
|
|
1134
|
+
interface PrivateMethod extends ClassMethodBase {
|
|
1044
1135
|
type: "PrivateMethod";
|
|
1045
1136
|
key: PrivateName;
|
|
1046
1137
|
}
|
|
1047
|
-
|
|
1138
|
+
interface StaticBlock extends Node, HasSpan {
|
|
1048
1139
|
type: "StaticBlock";
|
|
1049
1140
|
body: BlockStatement;
|
|
1050
1141
|
}
|
|
1051
|
-
|
|
1142
|
+
interface Decorator extends Node, HasSpan {
|
|
1052
1143
|
type: "Decorator";
|
|
1053
1144
|
expression: Expression;
|
|
1054
1145
|
}
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1146
|
+
type MethodKind = "method" | "getter" | "setter";
|
|
1147
|
+
type Declaration = ClassDeclaration | FunctionDeclaration | VariableDeclaration | TsInterfaceDeclaration | TsTypeAliasDeclaration | TsEnumDeclaration | TsModuleDeclaration;
|
|
1148
|
+
interface FunctionDeclaration extends Fn {
|
|
1058
1149
|
type: "FunctionDeclaration";
|
|
1059
1150
|
identifier: Identifier;
|
|
1060
1151
|
declare: boolean;
|
|
1061
1152
|
}
|
|
1062
|
-
|
|
1153
|
+
interface ClassDeclaration extends Class, Node {
|
|
1063
1154
|
type: "ClassDeclaration";
|
|
1064
1155
|
identifier: Identifier;
|
|
1065
1156
|
declare: boolean;
|
|
1066
1157
|
}
|
|
1067
|
-
|
|
1158
|
+
interface VariableDeclaration extends Node, HasSpan {
|
|
1068
1159
|
type: "VariableDeclaration";
|
|
1069
1160
|
kind: VariableDeclarationKind;
|
|
1070
1161
|
declare: boolean;
|
|
1071
1162
|
declarations: VariableDeclarator[];
|
|
1072
1163
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1164
|
+
type VariableDeclarationKind = "var" | "let" | "const";
|
|
1165
|
+
interface VariableDeclarator extends Node, HasSpan {
|
|
1075
1166
|
type: "VariableDeclarator";
|
|
1076
1167
|
id: Pattern;
|
|
1077
1168
|
init?: Expression;
|
|
1078
1169
|
definite: boolean;
|
|
1079
1170
|
}
|
|
1080
|
-
|
|
1171
|
+
type Expression = ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | UnaryExpression | UpdateExpression | BinaryExpression | AssignmentExpression | MemberExpression | SuperPropExpression | ConditionalExpression | CallExpression | NewExpression | SequenceExpression | Identifier | Literal | TemplateLiteral | TaggedTemplateExpression | ArrowFunctionExpression | ClassExpression | YieldExpression | MetaProperty | AwaitExpression | ParenthesisExpression | JSXMemberExpression | JSXNamespacedName | JSXEmptyExpression | JSXElement | JSXFragment | TsTypeAssertion | TsConstAssertion | TsNonNullExpression | TsAsExpression | TsSatisfiesExpression | TsInstantiation | PrivateName | OptionalChainingExpression | Invalid;
|
|
1081
1172
|
interface ExpressionBase extends Node, HasSpan {
|
|
1082
1173
|
}
|
|
1083
|
-
|
|
1174
|
+
interface Identifier extends ExpressionBase {
|
|
1084
1175
|
type: "Identifier";
|
|
1085
1176
|
value: string;
|
|
1086
1177
|
optional: boolean;
|
|
1087
1178
|
}
|
|
1088
|
-
|
|
1179
|
+
interface OptionalChainingExpression extends ExpressionBase {
|
|
1089
1180
|
type: "OptionalChainingExpression";
|
|
1090
1181
|
questionDotToken: Span;
|
|
1091
1182
|
/**
|
|
@@ -1093,106 +1184,106 @@ export interface OptionalChainingExpression extends ExpressionBase {
|
|
|
1093
1184
|
*/
|
|
1094
1185
|
base: MemberExpression | OptionalChainingCall;
|
|
1095
1186
|
}
|
|
1096
|
-
|
|
1187
|
+
interface OptionalChainingCall extends ExpressionBase {
|
|
1097
1188
|
type: "CallExpression";
|
|
1098
1189
|
callee: Expression;
|
|
1099
1190
|
arguments: ExprOrSpread[];
|
|
1100
1191
|
typeArguments?: TsTypeParameterInstantiation;
|
|
1101
1192
|
}
|
|
1102
|
-
|
|
1193
|
+
interface ThisExpression extends ExpressionBase {
|
|
1103
1194
|
type: "ThisExpression";
|
|
1104
1195
|
}
|
|
1105
|
-
|
|
1196
|
+
interface ArrayExpression extends ExpressionBase {
|
|
1106
1197
|
type: "ArrayExpression";
|
|
1107
1198
|
elements: (ExprOrSpread | undefined)[];
|
|
1108
1199
|
}
|
|
1109
|
-
|
|
1200
|
+
interface ExprOrSpread {
|
|
1110
1201
|
spread?: Span;
|
|
1111
1202
|
expression: Expression;
|
|
1112
1203
|
}
|
|
1113
|
-
|
|
1204
|
+
interface ObjectExpression extends ExpressionBase {
|
|
1114
1205
|
type: "ObjectExpression";
|
|
1115
1206
|
properties: (SpreadElement | Property)[];
|
|
1116
1207
|
}
|
|
1117
|
-
|
|
1208
|
+
interface Argument {
|
|
1118
1209
|
spread?: Span;
|
|
1119
1210
|
expression: Expression;
|
|
1120
1211
|
}
|
|
1121
|
-
|
|
1212
|
+
interface SpreadElement extends Node {
|
|
1122
1213
|
type: "SpreadElement";
|
|
1123
1214
|
spread: Span;
|
|
1124
1215
|
arguments: Expression;
|
|
1125
1216
|
}
|
|
1126
|
-
|
|
1217
|
+
interface UnaryExpression extends ExpressionBase {
|
|
1127
1218
|
type: "UnaryExpression";
|
|
1128
1219
|
operator: UnaryOperator;
|
|
1129
1220
|
argument: Expression;
|
|
1130
1221
|
}
|
|
1131
|
-
|
|
1222
|
+
interface UpdateExpression extends ExpressionBase {
|
|
1132
1223
|
type: "UpdateExpression";
|
|
1133
1224
|
operator: UpdateOperator;
|
|
1134
1225
|
prefix: boolean;
|
|
1135
1226
|
argument: Expression;
|
|
1136
1227
|
}
|
|
1137
|
-
|
|
1228
|
+
interface BinaryExpression extends ExpressionBase {
|
|
1138
1229
|
type: "BinaryExpression";
|
|
1139
1230
|
operator: BinaryOperator;
|
|
1140
1231
|
left: Expression;
|
|
1141
1232
|
right: Expression;
|
|
1142
1233
|
}
|
|
1143
|
-
|
|
1234
|
+
interface FunctionExpression extends Fn, ExpressionBase {
|
|
1144
1235
|
type: "FunctionExpression";
|
|
1145
1236
|
identifier?: Identifier;
|
|
1146
1237
|
}
|
|
1147
|
-
|
|
1238
|
+
interface ClassExpression extends Class, ExpressionBase {
|
|
1148
1239
|
type: "ClassExpression";
|
|
1149
1240
|
identifier?: Identifier;
|
|
1150
1241
|
}
|
|
1151
|
-
|
|
1242
|
+
interface AssignmentExpression extends ExpressionBase {
|
|
1152
1243
|
type: "AssignmentExpression";
|
|
1153
1244
|
operator: AssignmentOperator;
|
|
1154
1245
|
left: Expression | Pattern;
|
|
1155
1246
|
right: Expression;
|
|
1156
1247
|
}
|
|
1157
|
-
|
|
1248
|
+
interface MemberExpression extends ExpressionBase {
|
|
1158
1249
|
type: "MemberExpression";
|
|
1159
1250
|
object: Expression;
|
|
1160
1251
|
property: Identifier | PrivateName | ComputedPropName;
|
|
1161
1252
|
}
|
|
1162
|
-
|
|
1253
|
+
interface SuperPropExpression extends ExpressionBase {
|
|
1163
1254
|
type: "SuperPropExpression";
|
|
1164
1255
|
obj: Super;
|
|
1165
1256
|
property: Identifier | ComputedPropName;
|
|
1166
1257
|
}
|
|
1167
|
-
|
|
1258
|
+
interface ConditionalExpression extends ExpressionBase {
|
|
1168
1259
|
type: "ConditionalExpression";
|
|
1169
1260
|
test: Expression;
|
|
1170
1261
|
consequent: Expression;
|
|
1171
1262
|
alternate: Expression;
|
|
1172
1263
|
}
|
|
1173
|
-
|
|
1264
|
+
interface Super extends Node, HasSpan {
|
|
1174
1265
|
type: "Super";
|
|
1175
1266
|
}
|
|
1176
|
-
|
|
1267
|
+
interface Import extends Node, HasSpan {
|
|
1177
1268
|
type: "Import";
|
|
1178
1269
|
}
|
|
1179
|
-
|
|
1270
|
+
interface CallExpression extends ExpressionBase {
|
|
1180
1271
|
type: "CallExpression";
|
|
1181
1272
|
callee: Super | Import | Expression;
|
|
1182
1273
|
arguments: Argument[];
|
|
1183
1274
|
typeArguments?: TsTypeParameterInstantiation;
|
|
1184
1275
|
}
|
|
1185
|
-
|
|
1276
|
+
interface NewExpression extends ExpressionBase {
|
|
1186
1277
|
type: "NewExpression";
|
|
1187
1278
|
callee: Expression;
|
|
1188
1279
|
arguments?: Argument[];
|
|
1189
1280
|
typeArguments?: TsTypeParameterInstantiation;
|
|
1190
1281
|
}
|
|
1191
|
-
|
|
1282
|
+
interface SequenceExpression extends ExpressionBase {
|
|
1192
1283
|
type: "SequenceExpression";
|
|
1193
1284
|
expressions: Expression[];
|
|
1194
1285
|
}
|
|
1195
|
-
|
|
1286
|
+
interface ArrowFunctionExpression extends ExpressionBase {
|
|
1196
1287
|
type: "ArrowFunctionExpression";
|
|
1197
1288
|
params: Pattern[];
|
|
1198
1289
|
body: BlockStatement | Expression;
|
|
@@ -1201,41 +1292,41 @@ export interface ArrowFunctionExpression extends ExpressionBase {
|
|
|
1201
1292
|
typeParameters?: TsTypeParameterDeclaration;
|
|
1202
1293
|
returnType?: TsTypeAnnotation;
|
|
1203
1294
|
}
|
|
1204
|
-
|
|
1295
|
+
interface YieldExpression extends ExpressionBase {
|
|
1205
1296
|
type: "YieldExpression";
|
|
1206
1297
|
argument?: Expression;
|
|
1207
1298
|
delegate: boolean;
|
|
1208
1299
|
}
|
|
1209
|
-
|
|
1300
|
+
interface MetaProperty extends Node, HasSpan {
|
|
1210
1301
|
type: "MetaProperty";
|
|
1211
1302
|
kind: "new.target" | "import.meta";
|
|
1212
1303
|
}
|
|
1213
|
-
|
|
1304
|
+
interface AwaitExpression extends ExpressionBase {
|
|
1214
1305
|
type: "AwaitExpression";
|
|
1215
1306
|
argument: Expression;
|
|
1216
1307
|
}
|
|
1217
|
-
|
|
1308
|
+
interface TemplateLiteral extends ExpressionBase {
|
|
1218
1309
|
type: "TemplateLiteral";
|
|
1219
1310
|
expressions: Expression[];
|
|
1220
1311
|
quasis: TemplateElement[];
|
|
1221
1312
|
}
|
|
1222
|
-
|
|
1313
|
+
interface TaggedTemplateExpression extends ExpressionBase {
|
|
1223
1314
|
type: "TaggedTemplateExpression";
|
|
1224
1315
|
tag: Expression;
|
|
1225
1316
|
typeParameters?: TsTypeParameterInstantiation;
|
|
1226
1317
|
template: TemplateLiteral;
|
|
1227
1318
|
}
|
|
1228
|
-
|
|
1319
|
+
interface TemplateElement extends ExpressionBase {
|
|
1229
1320
|
type: "TemplateElement";
|
|
1230
1321
|
tail: boolean;
|
|
1231
1322
|
cooked?: string;
|
|
1232
1323
|
raw: string;
|
|
1233
1324
|
}
|
|
1234
|
-
|
|
1325
|
+
interface ParenthesisExpression extends ExpressionBase {
|
|
1235
1326
|
type: "ParenthesisExpression";
|
|
1236
1327
|
expression: Expression;
|
|
1237
1328
|
}
|
|
1238
|
-
|
|
1329
|
+
interface Fn extends HasSpan, HasDecorator {
|
|
1239
1330
|
params: Param[];
|
|
1240
1331
|
body?: BlockStatement;
|
|
1241
1332
|
generator: boolean;
|
|
@@ -1246,12 +1337,12 @@ export interface Fn extends HasSpan, HasDecorator {
|
|
|
1246
1337
|
interface PatternBase extends Node, HasSpan {
|
|
1247
1338
|
typeAnnotation?: TsTypeAnnotation;
|
|
1248
1339
|
}
|
|
1249
|
-
|
|
1340
|
+
interface PrivateName extends ExpressionBase {
|
|
1250
1341
|
type: "PrivateName";
|
|
1251
1342
|
id: Identifier;
|
|
1252
1343
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1344
|
+
type JSXObject = JSXMemberExpression | Identifier;
|
|
1345
|
+
interface JSXMemberExpression extends Node {
|
|
1255
1346
|
type: "JSXMemberExpression";
|
|
1256
1347
|
object: JSXObject;
|
|
1257
1348
|
property: Identifier;
|
|
@@ -1259,112 +1350,112 @@ export interface JSXMemberExpression extends Node {
|
|
|
1259
1350
|
/**
|
|
1260
1351
|
* XML-based namespace syntax:
|
|
1261
1352
|
*/
|
|
1262
|
-
|
|
1353
|
+
interface JSXNamespacedName extends Node {
|
|
1263
1354
|
type: "JSXNamespacedName";
|
|
1264
1355
|
namespace: Identifier;
|
|
1265
1356
|
name: Identifier;
|
|
1266
1357
|
}
|
|
1267
|
-
|
|
1358
|
+
interface JSXEmptyExpression extends Node, HasSpan {
|
|
1268
1359
|
type: "JSXEmptyExpression";
|
|
1269
1360
|
}
|
|
1270
|
-
|
|
1361
|
+
interface JSXExpressionContainer extends Node, HasSpan {
|
|
1271
1362
|
type: "JSXExpressionContainer";
|
|
1272
1363
|
expression: JSXExpression;
|
|
1273
1364
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1365
|
+
type JSXExpression = JSXEmptyExpression | Expression;
|
|
1366
|
+
interface JSXSpreadChild extends Node, HasSpan {
|
|
1276
1367
|
type: "JSXSpreadChild";
|
|
1277
1368
|
expression: Expression;
|
|
1278
1369
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1370
|
+
type JSXElementName = Identifier | JSXMemberExpression | JSXNamespacedName;
|
|
1371
|
+
interface JSXOpeningElement extends Node, HasSpan {
|
|
1281
1372
|
type: "JSXOpeningElement";
|
|
1282
1373
|
name: JSXElementName;
|
|
1283
1374
|
attributes: JSXAttributeOrSpread[];
|
|
1284
1375
|
selfClosing: boolean;
|
|
1285
1376
|
typeArguments?: TsTypeParameterInstantiation;
|
|
1286
1377
|
}
|
|
1287
|
-
|
|
1288
|
-
|
|
1378
|
+
type JSXAttributeOrSpread = JSXAttribute | SpreadElement;
|
|
1379
|
+
interface JSXClosingElement extends Node, HasSpan {
|
|
1289
1380
|
type: "JSXClosingElement";
|
|
1290
1381
|
name: JSXElementName;
|
|
1291
1382
|
}
|
|
1292
|
-
|
|
1383
|
+
interface JSXAttribute extends Node, HasSpan {
|
|
1293
1384
|
type: "JSXAttribute";
|
|
1294
1385
|
name: JSXAttributeName;
|
|
1295
1386
|
value?: JSXAttrValue;
|
|
1296
1387
|
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1388
|
+
type JSXAttributeName = Identifier | JSXNamespacedName;
|
|
1389
|
+
type JSXAttrValue = Literal | JSXExpressionContainer | JSXElement | JSXFragment;
|
|
1390
|
+
interface JSXText extends Node, HasSpan {
|
|
1300
1391
|
type: "JSXText";
|
|
1301
1392
|
value: string;
|
|
1302
1393
|
raw: string;
|
|
1303
1394
|
}
|
|
1304
|
-
|
|
1395
|
+
interface JSXElement extends Node, HasSpan {
|
|
1305
1396
|
type: "JSXElement";
|
|
1306
1397
|
opening: JSXOpeningElement;
|
|
1307
1398
|
children: JSXElementChild[];
|
|
1308
1399
|
closing?: JSXClosingElement;
|
|
1309
1400
|
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1401
|
+
type JSXElementChild = JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment;
|
|
1402
|
+
interface JSXFragment extends Node, HasSpan {
|
|
1312
1403
|
type: "JSXFragment";
|
|
1313
1404
|
opening: JSXOpeningFragment;
|
|
1314
1405
|
children: JSXElementChild[];
|
|
1315
1406
|
closing: JSXClosingFragment;
|
|
1316
1407
|
}
|
|
1317
|
-
|
|
1408
|
+
interface JSXOpeningFragment extends Node, HasSpan {
|
|
1318
1409
|
type: "JSXOpeningFragment";
|
|
1319
1410
|
}
|
|
1320
|
-
|
|
1411
|
+
interface JSXClosingFragment extends Node, HasSpan {
|
|
1321
1412
|
type: "JSXClosingFragment";
|
|
1322
1413
|
}
|
|
1323
|
-
|
|
1324
|
-
|
|
1414
|
+
type Literal = StringLiteral | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | JSXText;
|
|
1415
|
+
interface StringLiteral extends Node, HasSpan {
|
|
1325
1416
|
type: "StringLiteral";
|
|
1326
1417
|
value: string;
|
|
1327
1418
|
raw?: string;
|
|
1328
1419
|
}
|
|
1329
|
-
|
|
1420
|
+
interface BooleanLiteral extends Node, HasSpan {
|
|
1330
1421
|
type: "BooleanLiteral";
|
|
1331
1422
|
value: boolean;
|
|
1332
1423
|
}
|
|
1333
|
-
|
|
1424
|
+
interface NullLiteral extends Node, HasSpan {
|
|
1334
1425
|
type: "NullLiteral";
|
|
1335
1426
|
}
|
|
1336
|
-
|
|
1427
|
+
interface RegExpLiteral extends Node, HasSpan {
|
|
1337
1428
|
type: "RegExpLiteral";
|
|
1338
1429
|
pattern: string;
|
|
1339
1430
|
flags: string;
|
|
1340
1431
|
}
|
|
1341
|
-
|
|
1432
|
+
interface NumericLiteral extends Node, HasSpan {
|
|
1342
1433
|
type: "NumericLiteral";
|
|
1343
1434
|
value: number;
|
|
1344
1435
|
raw?: string;
|
|
1345
1436
|
}
|
|
1346
|
-
|
|
1437
|
+
interface BigIntLiteral extends Node, HasSpan {
|
|
1347
1438
|
type: "BigIntLiteral";
|
|
1348
1439
|
value: bigint;
|
|
1349
1440
|
raw?: string;
|
|
1350
1441
|
}
|
|
1351
|
-
|
|
1352
|
-
|
|
1442
|
+
type ModuleDeclaration = ImportDeclaration | ExportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportDefaultExpression | ExportAllDeclaration | TsImportEqualsDeclaration | TsExportAssignment | TsNamespaceExportDeclaration;
|
|
1443
|
+
interface ExportDefaultExpression extends Node, HasSpan {
|
|
1353
1444
|
type: "ExportDefaultExpression";
|
|
1354
1445
|
expression: Expression;
|
|
1355
1446
|
}
|
|
1356
|
-
|
|
1447
|
+
interface ExportDeclaration extends Node, HasSpan {
|
|
1357
1448
|
type: "ExportDeclaration";
|
|
1358
1449
|
declaration: Declaration;
|
|
1359
1450
|
}
|
|
1360
|
-
|
|
1451
|
+
interface ImportDeclaration extends Node, HasSpan {
|
|
1361
1452
|
type: "ImportDeclaration";
|
|
1362
1453
|
specifiers: ImportSpecifier[];
|
|
1363
1454
|
source: StringLiteral;
|
|
1364
1455
|
typeOnly: boolean;
|
|
1365
1456
|
asserts?: ObjectExpression;
|
|
1366
1457
|
}
|
|
1367
|
-
|
|
1458
|
+
interface ExportAllDeclaration extends Node, HasSpan {
|
|
1368
1459
|
type: "ExportAllDeclaration";
|
|
1369
1460
|
source: StringLiteral;
|
|
1370
1461
|
asserts?: ObjectExpression;
|
|
@@ -1373,30 +1464,30 @@ export interface ExportAllDeclaration extends Node, HasSpan {
|
|
|
1373
1464
|
* - `export { foo } from 'mod'`
|
|
1374
1465
|
* - `export { foo as bar } from 'mod'`
|
|
1375
1466
|
*/
|
|
1376
|
-
|
|
1467
|
+
interface ExportNamedDeclaration extends Node, HasSpan {
|
|
1377
1468
|
type: "ExportNamedDeclaration";
|
|
1378
1469
|
specifiers: ExportSpecifier[];
|
|
1379
1470
|
source?: StringLiteral;
|
|
1380
1471
|
typeOnly: boolean;
|
|
1381
1472
|
asserts?: ObjectExpression;
|
|
1382
1473
|
}
|
|
1383
|
-
|
|
1474
|
+
interface ExportDefaultDeclaration extends Node, HasSpan {
|
|
1384
1475
|
type: "ExportDefaultDeclaration";
|
|
1385
1476
|
decl: DefaultDecl;
|
|
1386
1477
|
}
|
|
1387
|
-
|
|
1388
|
-
|
|
1478
|
+
type DefaultDecl = ClassExpression | FunctionExpression | TsInterfaceDeclaration;
|
|
1479
|
+
type ImportSpecifier = NamedImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
|
|
1389
1480
|
/**
|
|
1390
1481
|
* e.g. `import foo from 'mod.js'`
|
|
1391
1482
|
*/
|
|
1392
|
-
|
|
1483
|
+
interface ImportDefaultSpecifier extends Node, HasSpan {
|
|
1393
1484
|
type: "ImportDefaultSpecifier";
|
|
1394
1485
|
local: Identifier;
|
|
1395
1486
|
}
|
|
1396
1487
|
/**
|
|
1397
1488
|
* e.g. `import * as foo from 'mod.js'`.
|
|
1398
1489
|
*/
|
|
1399
|
-
|
|
1490
|
+
interface ImportNamespaceSpecifier extends Node, HasSpan {
|
|
1400
1491
|
type: "ImportNamespaceSpecifier";
|
|
1401
1492
|
local: Identifier;
|
|
1402
1493
|
}
|
|
@@ -1409,26 +1500,26 @@ export interface ImportNamespaceSpecifier extends Node, HasSpan {
|
|
|
1409
1500
|
*
|
|
1410
1501
|
* local = bar, imported = Some(foo) for
|
|
1411
1502
|
*/
|
|
1412
|
-
|
|
1503
|
+
interface NamedImportSpecifier extends Node, HasSpan {
|
|
1413
1504
|
type: "ImportSpecifier";
|
|
1414
1505
|
local: Identifier;
|
|
1415
1506
|
imported?: ModuleExportName;
|
|
1416
1507
|
isTypeOnly: boolean;
|
|
1417
1508
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1509
|
+
type ModuleExportName = Identifier | StringLiteral;
|
|
1510
|
+
type ExportSpecifier = ExportNamespaceSpecifier | ExportDefaultSpecifier | NamedExportSpecifier;
|
|
1420
1511
|
/**
|
|
1421
1512
|
* `export * as foo from 'src';`
|
|
1422
1513
|
*/
|
|
1423
|
-
|
|
1514
|
+
interface ExportNamespaceSpecifier extends Node, HasSpan {
|
|
1424
1515
|
type: "ExportNamespaceSpecifier";
|
|
1425
1516
|
name: ModuleExportName;
|
|
1426
1517
|
}
|
|
1427
|
-
|
|
1518
|
+
interface ExportDefaultSpecifier extends Node, HasSpan {
|
|
1428
1519
|
type: "ExportDefaultSpecifier";
|
|
1429
1520
|
exported: Identifier;
|
|
1430
1521
|
}
|
|
1431
|
-
|
|
1522
|
+
interface NamedExportSpecifier extends Node, HasSpan {
|
|
1432
1523
|
type: "ExportSpecifier";
|
|
1433
1524
|
orig: ModuleExportName;
|
|
1434
1525
|
/**
|
|
@@ -1443,51 +1534,51 @@ interface HasInterpreter {
|
|
|
1443
1534
|
*/
|
|
1444
1535
|
interpreter: string;
|
|
1445
1536
|
}
|
|
1446
|
-
|
|
1447
|
-
|
|
1537
|
+
type Program = Module | Script;
|
|
1538
|
+
interface Module extends Node, HasSpan, HasInterpreter {
|
|
1448
1539
|
type: "Module";
|
|
1449
1540
|
body: ModuleItem[];
|
|
1450
1541
|
}
|
|
1451
|
-
|
|
1542
|
+
interface Script extends Node, HasSpan, HasInterpreter {
|
|
1452
1543
|
type: "Script";
|
|
1453
1544
|
body: Statement[];
|
|
1454
1545
|
}
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1546
|
+
type ModuleItem = ModuleDeclaration | Statement;
|
|
1547
|
+
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "||" | "&&" | "in" | "instanceof" | "**" | "??";
|
|
1548
|
+
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "&&=" | "||=" | "??=";
|
|
1549
|
+
type UpdateOperator = "++" | "--";
|
|
1550
|
+
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
|
1551
|
+
type Pattern = BindingIdentifier | ArrayPattern | RestElement | ObjectPattern | AssignmentPattern | Invalid | Expression;
|
|
1552
|
+
interface BindingIdentifier extends PatternBase {
|
|
1462
1553
|
type: "Identifier";
|
|
1463
1554
|
value: string;
|
|
1464
1555
|
optional: boolean;
|
|
1465
1556
|
}
|
|
1466
|
-
|
|
1557
|
+
interface ArrayPattern extends PatternBase {
|
|
1467
1558
|
type: "ArrayPattern";
|
|
1468
1559
|
elements: (Pattern | undefined)[];
|
|
1469
1560
|
optional: boolean;
|
|
1470
1561
|
}
|
|
1471
|
-
|
|
1562
|
+
interface ObjectPattern extends PatternBase {
|
|
1472
1563
|
type: "ObjectPattern";
|
|
1473
1564
|
properties: ObjectPatternProperty[];
|
|
1474
1565
|
optional: boolean;
|
|
1475
1566
|
}
|
|
1476
|
-
|
|
1567
|
+
interface AssignmentPattern extends PatternBase {
|
|
1477
1568
|
type: "AssignmentPattern";
|
|
1478
1569
|
left: Pattern;
|
|
1479
1570
|
right: Expression;
|
|
1480
1571
|
}
|
|
1481
|
-
|
|
1572
|
+
interface RestElement extends PatternBase {
|
|
1482
1573
|
type: "RestElement";
|
|
1483
1574
|
rest: Span;
|
|
1484
1575
|
argument: Pattern;
|
|
1485
1576
|
}
|
|
1486
|
-
|
|
1577
|
+
type ObjectPatternProperty = KeyValuePatternProperty | AssignmentPatternProperty | RestElement;
|
|
1487
1578
|
/**
|
|
1488
1579
|
* `{key: value}`
|
|
1489
1580
|
*/
|
|
1490
|
-
|
|
1581
|
+
interface KeyValuePatternProperty extends Node {
|
|
1491
1582
|
type: "KeyValuePatternProperty";
|
|
1492
1583
|
key: PropertyName;
|
|
1493
1584
|
value: Pattern;
|
|
@@ -1495,125 +1586,125 @@ export interface KeyValuePatternProperty extends Node {
|
|
|
1495
1586
|
/**
|
|
1496
1587
|
* `{key}` or `{key = value}`
|
|
1497
1588
|
*/
|
|
1498
|
-
|
|
1589
|
+
interface AssignmentPatternProperty extends Node, HasSpan {
|
|
1499
1590
|
type: "AssignmentPatternProperty";
|
|
1500
1591
|
key: Identifier;
|
|
1501
1592
|
value?: Expression;
|
|
1502
1593
|
}
|
|
1503
1594
|
/** Identifier is `a` in `{ a, }` */
|
|
1504
|
-
|
|
1595
|
+
type Property = Identifier | KeyValueProperty | AssignmentProperty | GetterProperty | SetterProperty | MethodProperty;
|
|
1505
1596
|
interface PropBase extends Node {
|
|
1506
1597
|
key: PropertyName;
|
|
1507
1598
|
}
|
|
1508
|
-
|
|
1599
|
+
interface KeyValueProperty extends PropBase {
|
|
1509
1600
|
type: "KeyValueProperty";
|
|
1510
1601
|
value: Expression;
|
|
1511
1602
|
}
|
|
1512
|
-
|
|
1603
|
+
interface AssignmentProperty extends Node {
|
|
1513
1604
|
type: "AssignmentProperty";
|
|
1514
1605
|
key: Identifier;
|
|
1515
1606
|
value: Expression;
|
|
1516
1607
|
}
|
|
1517
|
-
|
|
1608
|
+
interface GetterProperty extends PropBase, HasSpan {
|
|
1518
1609
|
type: "GetterProperty";
|
|
1519
1610
|
typeAnnotation?: TsTypeAnnotation;
|
|
1520
1611
|
body?: BlockStatement;
|
|
1521
1612
|
}
|
|
1522
|
-
|
|
1613
|
+
interface SetterProperty extends PropBase, HasSpan {
|
|
1523
1614
|
type: "SetterProperty";
|
|
1524
1615
|
param: Pattern;
|
|
1525
1616
|
body?: BlockStatement;
|
|
1526
1617
|
}
|
|
1527
|
-
|
|
1618
|
+
interface MethodProperty extends PropBase, Fn {
|
|
1528
1619
|
type: "MethodProperty";
|
|
1529
1620
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1621
|
+
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropName | BigIntLiteral;
|
|
1622
|
+
interface ComputedPropName extends Node, HasSpan {
|
|
1532
1623
|
type: "Computed";
|
|
1533
1624
|
expression: Expression;
|
|
1534
1625
|
}
|
|
1535
|
-
|
|
1626
|
+
interface BlockStatement extends Node, HasSpan {
|
|
1536
1627
|
type: "BlockStatement";
|
|
1537
1628
|
stmts: Statement[];
|
|
1538
1629
|
}
|
|
1539
|
-
|
|
1630
|
+
interface ExpressionStatement extends Node, HasSpan {
|
|
1540
1631
|
type: "ExpressionStatement";
|
|
1541
1632
|
expression: Expression;
|
|
1542
1633
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1634
|
+
type Statement = BlockStatement | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration | ExpressionStatement;
|
|
1635
|
+
interface EmptyStatement extends Node, HasSpan {
|
|
1545
1636
|
type: "EmptyStatement";
|
|
1546
1637
|
}
|
|
1547
|
-
|
|
1638
|
+
interface DebuggerStatement extends Node, HasSpan {
|
|
1548
1639
|
type: "DebuggerStatement";
|
|
1549
1640
|
}
|
|
1550
|
-
|
|
1641
|
+
interface WithStatement extends Node, HasSpan {
|
|
1551
1642
|
type: "WithStatement";
|
|
1552
1643
|
object: Expression;
|
|
1553
1644
|
body: Statement;
|
|
1554
1645
|
}
|
|
1555
|
-
|
|
1646
|
+
interface ReturnStatement extends Node, HasSpan {
|
|
1556
1647
|
type: "ReturnStatement";
|
|
1557
1648
|
argument?: Expression;
|
|
1558
1649
|
}
|
|
1559
|
-
|
|
1650
|
+
interface LabeledStatement extends Node, HasSpan {
|
|
1560
1651
|
type: "LabeledStatement";
|
|
1561
1652
|
label: Identifier;
|
|
1562
1653
|
body: Statement;
|
|
1563
1654
|
}
|
|
1564
|
-
|
|
1655
|
+
interface BreakStatement extends Node, HasSpan {
|
|
1565
1656
|
type: "BreakStatement";
|
|
1566
1657
|
label?: Identifier;
|
|
1567
1658
|
}
|
|
1568
|
-
|
|
1659
|
+
interface ContinueStatement extends Node, HasSpan {
|
|
1569
1660
|
type: "ContinueStatement";
|
|
1570
1661
|
label?: Identifier;
|
|
1571
1662
|
}
|
|
1572
|
-
|
|
1663
|
+
interface IfStatement extends Node, HasSpan {
|
|
1573
1664
|
type: "IfStatement";
|
|
1574
1665
|
test: Expression;
|
|
1575
1666
|
consequent: Statement;
|
|
1576
1667
|
alternate?: Statement;
|
|
1577
1668
|
}
|
|
1578
|
-
|
|
1669
|
+
interface SwitchStatement extends Node, HasSpan {
|
|
1579
1670
|
type: "SwitchStatement";
|
|
1580
1671
|
discriminant: Expression;
|
|
1581
1672
|
cases: SwitchCase[];
|
|
1582
1673
|
}
|
|
1583
|
-
|
|
1674
|
+
interface ThrowStatement extends Node, HasSpan {
|
|
1584
1675
|
type: "ThrowStatement";
|
|
1585
1676
|
argument: Expression;
|
|
1586
1677
|
}
|
|
1587
|
-
|
|
1678
|
+
interface TryStatement extends Node, HasSpan {
|
|
1588
1679
|
type: "TryStatement";
|
|
1589
1680
|
block: BlockStatement;
|
|
1590
1681
|
handler?: CatchClause;
|
|
1591
1682
|
finalizer?: BlockStatement;
|
|
1592
1683
|
}
|
|
1593
|
-
|
|
1684
|
+
interface WhileStatement extends Node, HasSpan {
|
|
1594
1685
|
type: "WhileStatement";
|
|
1595
1686
|
test: Expression;
|
|
1596
1687
|
body: Statement;
|
|
1597
1688
|
}
|
|
1598
|
-
|
|
1689
|
+
interface DoWhileStatement extends Node, HasSpan {
|
|
1599
1690
|
type: "DoWhileStatement";
|
|
1600
1691
|
test: Expression;
|
|
1601
1692
|
body: Statement;
|
|
1602
1693
|
}
|
|
1603
|
-
|
|
1694
|
+
interface ForStatement extends Node, HasSpan {
|
|
1604
1695
|
type: "ForStatement";
|
|
1605
1696
|
init?: VariableDeclaration | Expression;
|
|
1606
1697
|
test?: Expression;
|
|
1607
1698
|
update?: Expression;
|
|
1608
1699
|
body: Statement;
|
|
1609
1700
|
}
|
|
1610
|
-
|
|
1701
|
+
interface ForInStatement extends Node, HasSpan {
|
|
1611
1702
|
type: "ForInStatement";
|
|
1612
1703
|
left: VariableDeclaration | Pattern;
|
|
1613
1704
|
right: Expression;
|
|
1614
1705
|
body: Statement;
|
|
1615
1706
|
}
|
|
1616
|
-
|
|
1707
|
+
interface ForOfStatement extends Node, HasSpan {
|
|
1617
1708
|
type: "ForOfStatement";
|
|
1618
1709
|
/**
|
|
1619
1710
|
* Span of the await token.
|
|
@@ -1625,7 +1716,7 @@ export interface ForOfStatement extends Node, HasSpan {
|
|
|
1625
1716
|
right: Expression;
|
|
1626
1717
|
body: Statement;
|
|
1627
1718
|
}
|
|
1628
|
-
|
|
1719
|
+
interface SwitchCase extends Node, HasSpan {
|
|
1629
1720
|
type: "SwitchCase";
|
|
1630
1721
|
/**
|
|
1631
1722
|
* Undefined for default case
|
|
@@ -1633,7 +1724,7 @@ export interface SwitchCase extends Node, HasSpan {
|
|
|
1633
1724
|
test?: Expression;
|
|
1634
1725
|
consequent: Statement[];
|
|
1635
1726
|
}
|
|
1636
|
-
|
|
1727
|
+
interface CatchClause extends Node, HasSpan {
|
|
1637
1728
|
type: "CatchClause";
|
|
1638
1729
|
/**
|
|
1639
1730
|
* The param is `undefined` if the catch binding is omitted. E.g., `try { foo() } catch {}`
|
|
@@ -1641,15 +1732,15 @@ export interface CatchClause extends Node, HasSpan {
|
|
|
1641
1732
|
param?: Pattern;
|
|
1642
1733
|
body: BlockStatement;
|
|
1643
1734
|
}
|
|
1644
|
-
|
|
1735
|
+
interface TsTypeAnnotation extends Node, HasSpan {
|
|
1645
1736
|
type: "TsTypeAnnotation";
|
|
1646
1737
|
typeAnnotation: TsType;
|
|
1647
1738
|
}
|
|
1648
|
-
|
|
1739
|
+
interface TsTypeParameterDeclaration extends Node, HasSpan {
|
|
1649
1740
|
type: "TsTypeParameterDeclaration";
|
|
1650
1741
|
parameters: TsTypeParameter[];
|
|
1651
1742
|
}
|
|
1652
|
-
|
|
1743
|
+
interface TsTypeParameter extends Node, HasSpan {
|
|
1653
1744
|
type: "TsTypeParameter";
|
|
1654
1745
|
name: Identifier;
|
|
1655
1746
|
in: boolean;
|
|
@@ -1657,38 +1748,38 @@ export interface TsTypeParameter extends Node, HasSpan {
|
|
|
1657
1748
|
constraint?: TsType;
|
|
1658
1749
|
default?: TsType;
|
|
1659
1750
|
}
|
|
1660
|
-
|
|
1751
|
+
interface TsTypeParameterInstantiation extends Node, HasSpan {
|
|
1661
1752
|
type: "TsTypeParameterInstantiation";
|
|
1662
1753
|
params: TsType[];
|
|
1663
1754
|
}
|
|
1664
|
-
|
|
1755
|
+
interface TsParameterProperty extends Node, HasSpan, HasDecorator {
|
|
1665
1756
|
type: "TsParameterProperty";
|
|
1666
1757
|
accessibility?: Accessibility;
|
|
1667
1758
|
override: boolean;
|
|
1668
1759
|
readonly: boolean;
|
|
1669
1760
|
param: TsParameterPropertyParameter;
|
|
1670
1761
|
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1762
|
+
type TsParameterPropertyParameter = BindingIdentifier | AssignmentPattern;
|
|
1763
|
+
interface TsQualifiedName extends Node {
|
|
1673
1764
|
type: "TsQualifiedName";
|
|
1674
1765
|
left: TsEntityName;
|
|
1675
1766
|
right: Identifier;
|
|
1676
1767
|
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1768
|
+
type TsEntityName = TsQualifiedName | Identifier;
|
|
1769
|
+
type TsTypeElement = TsCallSignatureDeclaration | TsConstructSignatureDeclaration | TsPropertySignature | TsGetterSignature | TsSetterSignature | TsMethodSignature | TsIndexSignature;
|
|
1770
|
+
interface TsCallSignatureDeclaration extends Node, HasSpan {
|
|
1680
1771
|
type: "TsCallSignatureDeclaration";
|
|
1681
1772
|
params: TsFnParameter[];
|
|
1682
1773
|
typeAnnotation?: TsTypeAnnotation;
|
|
1683
1774
|
typeParams?: TsTypeParameterDeclaration;
|
|
1684
1775
|
}
|
|
1685
|
-
|
|
1776
|
+
interface TsConstructSignatureDeclaration extends Node, HasSpan {
|
|
1686
1777
|
type: "TsConstructSignatureDeclaration";
|
|
1687
1778
|
params: TsFnParameter[];
|
|
1688
1779
|
typeAnnotation?: TsTypeAnnotation;
|
|
1689
1780
|
typeParams?: TsTypeParameterDeclaration;
|
|
1690
1781
|
}
|
|
1691
|
-
|
|
1782
|
+
interface TsPropertySignature extends Node, HasSpan {
|
|
1692
1783
|
type: "TsPropertySignature";
|
|
1693
1784
|
readonly: boolean;
|
|
1694
1785
|
key: Expression;
|
|
@@ -1696,7 +1787,7 @@ export interface TsPropertySignature extends Node, HasSpan {
|
|
|
1696
1787
|
optional: boolean;
|
|
1697
1788
|
typeAnnotation?: TsTypeAnnotation;
|
|
1698
1789
|
}
|
|
1699
|
-
|
|
1790
|
+
interface TsGetterSignature extends Node, HasSpan {
|
|
1700
1791
|
type: "TsGetterSignature";
|
|
1701
1792
|
readonly: boolean;
|
|
1702
1793
|
key: Expression;
|
|
@@ -1704,7 +1795,7 @@ export interface TsGetterSignature extends Node, HasSpan {
|
|
|
1704
1795
|
optional: boolean;
|
|
1705
1796
|
typeAnnotation?: TsTypeAnnotation;
|
|
1706
1797
|
}
|
|
1707
|
-
|
|
1798
|
+
interface TsSetterSignature extends Node, HasSpan {
|
|
1708
1799
|
type: "TsSetterSignature";
|
|
1709
1800
|
readonly: boolean;
|
|
1710
1801
|
key: Expression;
|
|
@@ -1712,7 +1803,7 @@ export interface TsSetterSignature extends Node, HasSpan {
|
|
|
1712
1803
|
optional: boolean;
|
|
1713
1804
|
param: TsFnParameter;
|
|
1714
1805
|
}
|
|
1715
|
-
|
|
1806
|
+
interface TsMethodSignature extends Node, HasSpan {
|
|
1716
1807
|
type: "TsMethodSignature";
|
|
1717
1808
|
readonly: boolean;
|
|
1718
1809
|
key: Expression;
|
|
@@ -1722,50 +1813,50 @@ export interface TsMethodSignature extends Node, HasSpan {
|
|
|
1722
1813
|
typeAnn?: TsTypeAnnotation;
|
|
1723
1814
|
typeParams?: TsTypeParameterDeclaration;
|
|
1724
1815
|
}
|
|
1725
|
-
|
|
1816
|
+
interface TsIndexSignature extends Node, HasSpan {
|
|
1726
1817
|
type: "TsIndexSignature";
|
|
1727
1818
|
params: TsFnParameter[];
|
|
1728
1819
|
typeAnnotation?: TsTypeAnnotation;
|
|
1729
1820
|
readonly: boolean;
|
|
1730
1821
|
static: boolean;
|
|
1731
1822
|
}
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1823
|
+
type TsType = TsKeywordType | TsThisType | TsFnOrConstructorType | TsTypeReference | TsTypeQuery | TsTypeLiteral | TsArrayType | TsTupleType | TsOptionalType | TsRestType | TsUnionOrIntersectionType | TsConditionalType | TsInferType | TsParenthesizedType | TsTypeOperator | TsIndexedAccessType | TsMappedType | TsLiteralType | TsTypePredicate | TsImportType;
|
|
1824
|
+
type TsFnOrConstructorType = TsFunctionType | TsConstructorType;
|
|
1825
|
+
interface TsKeywordType extends Node, HasSpan {
|
|
1735
1826
|
type: "TsKeywordType";
|
|
1736
1827
|
kind: TsKeywordTypeKind;
|
|
1737
1828
|
}
|
|
1738
|
-
|
|
1739
|
-
|
|
1829
|
+
type TsKeywordTypeKind = "any" | "unknown" | "number" | "object" | "boolean" | "bigint" | "string" | "symbol" | "void" | "undefined" | "null" | "never" | "intrinsic";
|
|
1830
|
+
interface TsThisType extends Node, HasSpan {
|
|
1740
1831
|
type: "TsThisType";
|
|
1741
1832
|
}
|
|
1742
|
-
|
|
1743
|
-
|
|
1833
|
+
type TsFnParameter = BindingIdentifier | ArrayPattern | RestElement | ObjectPattern;
|
|
1834
|
+
interface TsFunctionType extends Node, HasSpan {
|
|
1744
1835
|
type: "TsFunctionType";
|
|
1745
1836
|
params: TsFnParameter[];
|
|
1746
1837
|
typeParams?: TsTypeParameterDeclaration;
|
|
1747
1838
|
typeAnnotation: TsTypeAnnotation;
|
|
1748
1839
|
}
|
|
1749
|
-
|
|
1840
|
+
interface TsConstructorType extends Node, HasSpan {
|
|
1750
1841
|
type: "TsConstructorType";
|
|
1751
1842
|
params: TsFnParameter[];
|
|
1752
1843
|
typeParams?: TsTypeParameterDeclaration;
|
|
1753
1844
|
typeAnnotation: TsTypeAnnotation;
|
|
1754
1845
|
isAbstract: boolean;
|
|
1755
1846
|
}
|
|
1756
|
-
|
|
1847
|
+
interface TsTypeReference extends Node, HasSpan {
|
|
1757
1848
|
type: "TsTypeReference";
|
|
1758
1849
|
typeName: TsEntityName;
|
|
1759
1850
|
typeParams?: TsTypeParameterInstantiation;
|
|
1760
1851
|
}
|
|
1761
|
-
|
|
1852
|
+
interface TsTypePredicate extends Node, HasSpan {
|
|
1762
1853
|
type: "TsTypePredicate";
|
|
1763
1854
|
asserts: boolean;
|
|
1764
1855
|
paramName: TsThisTypeOrIdent;
|
|
1765
1856
|
typeAnnotation?: TsTypeAnnotation;
|
|
1766
1857
|
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1858
|
+
type TsThisTypeOrIdent = TsThisType | Identifier;
|
|
1859
|
+
interface TsImportType extends Node, HasSpan {
|
|
1769
1860
|
type: "TsImportType";
|
|
1770
1861
|
argument: StringLiteral;
|
|
1771
1862
|
qualifier?: TsEntityName;
|
|
@@ -1774,75 +1865,75 @@ export interface TsImportType extends Node, HasSpan {
|
|
|
1774
1865
|
/**
|
|
1775
1866
|
* `typeof` operator
|
|
1776
1867
|
*/
|
|
1777
|
-
|
|
1868
|
+
interface TsTypeQuery extends Node, HasSpan {
|
|
1778
1869
|
type: "TsTypeQuery";
|
|
1779
1870
|
exprName: TsTypeQueryExpr;
|
|
1780
1871
|
typeArguments?: TsTypeParameterInstantiation;
|
|
1781
1872
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1873
|
+
type TsTypeQueryExpr = TsEntityName | TsImportType;
|
|
1874
|
+
interface TsTypeLiteral extends Node, HasSpan {
|
|
1784
1875
|
type: "TsTypeLiteral";
|
|
1785
1876
|
members: TsTypeElement[];
|
|
1786
1877
|
}
|
|
1787
|
-
|
|
1878
|
+
interface TsArrayType extends Node, HasSpan {
|
|
1788
1879
|
type: "TsArrayType";
|
|
1789
1880
|
elemType: TsType;
|
|
1790
1881
|
}
|
|
1791
|
-
|
|
1882
|
+
interface TsTupleType extends Node, HasSpan {
|
|
1792
1883
|
type: "TsTupleType";
|
|
1793
1884
|
elemTypes: TsTupleElement[];
|
|
1794
1885
|
}
|
|
1795
|
-
|
|
1886
|
+
interface TsTupleElement extends Node, HasSpan {
|
|
1796
1887
|
type: "TsTupleElement";
|
|
1797
1888
|
label?: Pattern;
|
|
1798
1889
|
ty: TsType;
|
|
1799
1890
|
}
|
|
1800
|
-
|
|
1891
|
+
interface TsOptionalType extends Node, HasSpan {
|
|
1801
1892
|
type: "TsOptionalType";
|
|
1802
1893
|
typeAnnotation: TsType;
|
|
1803
1894
|
}
|
|
1804
|
-
|
|
1895
|
+
interface TsRestType extends Node, HasSpan {
|
|
1805
1896
|
type: "TsRestType";
|
|
1806
1897
|
typeAnnotation: TsType;
|
|
1807
1898
|
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1899
|
+
type TsUnionOrIntersectionType = TsUnionType | TsIntersectionType;
|
|
1900
|
+
interface TsUnionType extends Node, HasSpan {
|
|
1810
1901
|
type: "TsUnionType";
|
|
1811
1902
|
types: TsType[];
|
|
1812
1903
|
}
|
|
1813
|
-
|
|
1904
|
+
interface TsIntersectionType extends Node, HasSpan {
|
|
1814
1905
|
type: "TsIntersectionType";
|
|
1815
1906
|
types: TsType[];
|
|
1816
1907
|
}
|
|
1817
|
-
|
|
1908
|
+
interface TsConditionalType extends Node, HasSpan {
|
|
1818
1909
|
type: "TsConditionalType";
|
|
1819
1910
|
checkType: TsType;
|
|
1820
1911
|
extendsType: TsType;
|
|
1821
1912
|
trueType: TsType;
|
|
1822
1913
|
falseType: TsType;
|
|
1823
1914
|
}
|
|
1824
|
-
|
|
1915
|
+
interface TsInferType extends Node, HasSpan {
|
|
1825
1916
|
type: "TsInferType";
|
|
1826
1917
|
typeParam: TsTypeParameter;
|
|
1827
1918
|
}
|
|
1828
|
-
|
|
1919
|
+
interface TsParenthesizedType extends Node, HasSpan {
|
|
1829
1920
|
type: "TsParenthesizedType";
|
|
1830
1921
|
typeAnnotation: TsType;
|
|
1831
1922
|
}
|
|
1832
|
-
|
|
1923
|
+
interface TsTypeOperator extends Node, HasSpan {
|
|
1833
1924
|
type: "TsTypeOperator";
|
|
1834
1925
|
op: TsTypeOperatorOp;
|
|
1835
1926
|
typeAnnotation: TsType;
|
|
1836
1927
|
}
|
|
1837
|
-
|
|
1838
|
-
|
|
1928
|
+
type TsTypeOperatorOp = "keyof" | "unique" | "readonly";
|
|
1929
|
+
interface TsIndexedAccessType extends Node, HasSpan {
|
|
1839
1930
|
type: "TsIndexedAccessType";
|
|
1840
1931
|
readonly: boolean;
|
|
1841
1932
|
objectType: TsType;
|
|
1842
1933
|
indexType: TsType;
|
|
1843
1934
|
}
|
|
1844
|
-
|
|
1845
|
-
|
|
1935
|
+
type TruePlusMinus = true | "+" | "-";
|
|
1936
|
+
interface TsMappedType extends Node, HasSpan {
|
|
1846
1937
|
type: "TsMappedType";
|
|
1847
1938
|
readonly?: TruePlusMinus;
|
|
1848
1939
|
typeParam: TsTypeParameter;
|
|
@@ -1850,17 +1941,17 @@ export interface TsMappedType extends Node, HasSpan {
|
|
|
1850
1941
|
optional?: TruePlusMinus;
|
|
1851
1942
|
typeAnnotation?: TsType;
|
|
1852
1943
|
}
|
|
1853
|
-
|
|
1944
|
+
interface TsLiteralType extends Node, HasSpan {
|
|
1854
1945
|
type: "TsLiteralType";
|
|
1855
1946
|
literal: TsLiteral;
|
|
1856
1947
|
}
|
|
1857
|
-
|
|
1858
|
-
|
|
1948
|
+
type TsLiteral = NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | TsTemplateLiteralType;
|
|
1949
|
+
interface TsTemplateLiteralType extends Node, HasSpan {
|
|
1859
1950
|
type: "TemplateLiteral";
|
|
1860
1951
|
types: TsType[];
|
|
1861
1952
|
quasis: TemplateElement[];
|
|
1862
1953
|
}
|
|
1863
|
-
|
|
1954
|
+
interface TsInterfaceDeclaration extends Node, HasSpan {
|
|
1864
1955
|
type: "TsInterfaceDeclaration";
|
|
1865
1956
|
id: Identifier;
|
|
1866
1957
|
declare: boolean;
|
|
@@ -1868,36 +1959,36 @@ export interface TsInterfaceDeclaration extends Node, HasSpan {
|
|
|
1868
1959
|
extends: TsExpressionWithTypeArguments[];
|
|
1869
1960
|
body: TsInterfaceBody;
|
|
1870
1961
|
}
|
|
1871
|
-
|
|
1962
|
+
interface TsInterfaceBody extends Node, HasSpan {
|
|
1872
1963
|
type: "TsInterfaceBody";
|
|
1873
1964
|
body: TsTypeElement[];
|
|
1874
1965
|
}
|
|
1875
|
-
|
|
1966
|
+
interface TsExpressionWithTypeArguments extends Node, HasSpan {
|
|
1876
1967
|
type: "TsExpressionWithTypeArguments";
|
|
1877
1968
|
expression: Expression;
|
|
1878
1969
|
typeArguments?: TsTypeParameterInstantiation;
|
|
1879
1970
|
}
|
|
1880
|
-
|
|
1971
|
+
interface TsTypeAliasDeclaration extends Node, HasSpan {
|
|
1881
1972
|
type: "TsTypeAliasDeclaration";
|
|
1882
1973
|
declare: boolean;
|
|
1883
1974
|
id: Identifier;
|
|
1884
1975
|
typeParams?: TsTypeParameterDeclaration;
|
|
1885
1976
|
typeAnnotation: TsType;
|
|
1886
1977
|
}
|
|
1887
|
-
|
|
1978
|
+
interface TsEnumDeclaration extends Node, HasSpan {
|
|
1888
1979
|
type: "TsEnumDeclaration";
|
|
1889
1980
|
declare: boolean;
|
|
1890
1981
|
isConst: boolean;
|
|
1891
1982
|
id: Identifier;
|
|
1892
1983
|
members: TsEnumMember[];
|
|
1893
1984
|
}
|
|
1894
|
-
|
|
1985
|
+
interface TsEnumMember extends Node, HasSpan {
|
|
1895
1986
|
type: "TsEnumMember";
|
|
1896
1987
|
id: TsEnumMemberId;
|
|
1897
1988
|
init?: Expression;
|
|
1898
1989
|
}
|
|
1899
|
-
|
|
1900
|
-
|
|
1990
|
+
type TsEnumMemberId = Identifier | StringLiteral;
|
|
1991
|
+
interface TsModuleDeclaration extends Node, HasSpan {
|
|
1901
1992
|
type: "TsModuleDeclaration";
|
|
1902
1993
|
declare: boolean;
|
|
1903
1994
|
global: boolean;
|
|
@@ -1907,20 +1998,20 @@ export interface TsModuleDeclaration extends Node, HasSpan {
|
|
|
1907
1998
|
/**
|
|
1908
1999
|
* `namespace A.B { }` is a namespace named `A` with another TsNamespaceDecl as its body.
|
|
1909
2000
|
*/
|
|
1910
|
-
|
|
1911
|
-
|
|
2001
|
+
type TsNamespaceBody = TsModuleBlock | TsNamespaceDeclaration;
|
|
2002
|
+
interface TsModuleBlock extends Node, HasSpan {
|
|
1912
2003
|
type: "TsModuleBlock";
|
|
1913
2004
|
body: ModuleItem[];
|
|
1914
2005
|
}
|
|
1915
|
-
|
|
2006
|
+
interface TsNamespaceDeclaration extends Node, HasSpan {
|
|
1916
2007
|
type: "TsNamespaceDeclaration";
|
|
1917
2008
|
declare: boolean;
|
|
1918
2009
|
global: boolean;
|
|
1919
2010
|
id: Identifier;
|
|
1920
2011
|
body: TsNamespaceBody;
|
|
1921
2012
|
}
|
|
1922
|
-
|
|
1923
|
-
|
|
2013
|
+
type TsModuleName = Identifier | StringLiteral;
|
|
2014
|
+
interface TsImportEqualsDeclaration extends Node, HasSpan {
|
|
1924
2015
|
type: "TsImportEqualsDeclaration";
|
|
1925
2016
|
declare: boolean;
|
|
1926
2017
|
isExport: boolean;
|
|
@@ -1928,50 +2019,50 @@ export interface TsImportEqualsDeclaration extends Node, HasSpan {
|
|
|
1928
2019
|
id: Identifier;
|
|
1929
2020
|
moduleRef: TsModuleReference;
|
|
1930
2021
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
2022
|
+
type TsModuleReference = TsEntityName | TsExternalModuleReference;
|
|
2023
|
+
interface TsExternalModuleReference extends Node, HasSpan {
|
|
1933
2024
|
type: "TsExternalModuleReference";
|
|
1934
2025
|
expression: StringLiteral;
|
|
1935
2026
|
}
|
|
1936
|
-
|
|
2027
|
+
interface TsExportAssignment extends Node, HasSpan {
|
|
1937
2028
|
type: "TsExportAssignment";
|
|
1938
2029
|
expression: Expression;
|
|
1939
2030
|
}
|
|
1940
|
-
|
|
2031
|
+
interface TsNamespaceExportDeclaration extends Node, HasSpan {
|
|
1941
2032
|
type: "TsNamespaceExportDeclaration";
|
|
1942
2033
|
id: Identifier;
|
|
1943
2034
|
}
|
|
1944
|
-
|
|
2035
|
+
interface TsAsExpression extends ExpressionBase {
|
|
1945
2036
|
type: "TsAsExpression";
|
|
1946
2037
|
expression: Expression;
|
|
1947
2038
|
typeAnnotation: TsType;
|
|
1948
2039
|
}
|
|
1949
|
-
|
|
2040
|
+
interface TsSatisfiesExpression extends ExpressionBase {
|
|
1950
2041
|
type: "TsSatisfiesExpression";
|
|
1951
2042
|
expression: Expression;
|
|
1952
2043
|
typeAnnotation: TsType;
|
|
1953
2044
|
}
|
|
1954
|
-
|
|
2045
|
+
interface TsInstantiation extends Node, HasSpan {
|
|
1955
2046
|
type: "TsInstantiation";
|
|
1956
2047
|
expression: Expression;
|
|
1957
2048
|
typeArguments: TsTypeParameterInstantiation;
|
|
1958
2049
|
}
|
|
1959
|
-
|
|
2050
|
+
interface TsTypeAssertion extends ExpressionBase {
|
|
1960
2051
|
type: "TsTypeAssertion";
|
|
1961
2052
|
expression: Expression;
|
|
1962
2053
|
typeAnnotation: TsType;
|
|
1963
2054
|
}
|
|
1964
|
-
|
|
2055
|
+
interface TsConstAssertion extends ExpressionBase {
|
|
1965
2056
|
type: "TsConstAssertion";
|
|
1966
2057
|
expression: Expression;
|
|
1967
2058
|
}
|
|
1968
|
-
|
|
2059
|
+
interface TsNonNullExpression extends ExpressionBase {
|
|
1969
2060
|
type: "TsNonNullExpression";
|
|
1970
2061
|
expression: Expression;
|
|
1971
2062
|
}
|
|
1972
|
-
|
|
1973
|
-
|
|
2063
|
+
type Accessibility = "public" | "protected" | "private";
|
|
2064
|
+
interface Invalid extends Node, HasSpan {
|
|
1974
2065
|
type: "Invalid";
|
|
1975
2066
|
}
|
|
1976
|
-
|
|
1977
|
-
|
|
2067
|
+
|
|
2068
|
+
export type { Accessibility, AmdConfig, Argument, ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentOperator, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, BaseModuleConfig, BigIntLiteral, BinaryExpression, BinaryOperator, BindingIdentifier, BlockStatement, BooleanLiteral, BreakStatement, CallExpression, CallerOptions, CatchClause, Class, ClassDeclaration, ClassExpression, ClassMember, ClassMethod, ClassMethodBase, ClassProperty, ClassPropertyBase, CommonJsConfig, ComputedPropName, ConditionalExpression, Config, ConstModulesConfig, Constructor, ContinueStatement, DebuggerStatement, Declaration, Decorator, DefaultDecl, DoWhileStatement, EmptyStatement, EnvConfig, Es6Config, EsParserConfig, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultExpression, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, ExprOrSpread, Expression, ExpressionStatement, Fn, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, GetterProperty, GlobalPassOption, HasDecorator, HasSpan, Identifier, IfStatement, Import, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, Invalid, JSXAttrValue, JSXAttribute, JSXAttributeName, JSXAttributeOrSpread, JSXClosingElement, JSXClosingFragment, JSXElement, JSXElementChild, JSXElementName, JSXEmptyExpression, JSXExpression, JSXExpressionContainer, JSXFragment, JSXMemberExpression, JSXNamespacedName, JSXObject, JSXOpeningElement, JSXOpeningFragment, JSXSpreadChild, JSXText, JsFormatOptions, JsMinifyOptions, JscConfig, JscTarget, KeyValuePatternProperty, KeyValueProperty, LabeledStatement, Literal, MatchPattern, MemberExpression, MetaProperty, MethodKind, MethodProperty, Module, ModuleConfig, ModuleDeclaration, ModuleExportName, ModuleItem, NamedExportSpecifier, NamedImportSpecifier, NewExpression, Node, NodeNextConfig, NullLiteral, NumericLiteral, ObjectExpression, ObjectPattern, ObjectPatternProperty, OptimizerConfig, OptionalChainingCall, OptionalChainingExpression, Options, Output, Param, ParenthesisExpression, ParseOptions, ParserConfig, Pattern, Plugin, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, ReactConfig, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, Span, SpreadElement, Statement, StaticBlock, StringLiteral, Super, SuperPropExpression, Swcrc, SwitchCase, SwitchStatement, SystemjsConfig, TaggedTemplateExpression, TemplateElement, TemplateLiteral, TerserCompressOptions, TerserEcmaVersion, TerserMangleOptions, TerserManglePropertiesOptions, ThisExpression, ThrowStatement, TransformConfig, TruePlusMinus, TryStatement, TsArrayType, TsAsExpression, TsCallSignatureDeclaration, TsConditionalType, TsConstAssertion, TsConstructSignatureDeclaration, TsConstructorType, TsEntityName, TsEnumDeclaration, TsEnumMember, TsEnumMemberId, TsExportAssignment, TsExpressionWithTypeArguments, TsExternalModuleReference, TsFnOrConstructorType, TsFnParameter, TsFunctionType, TsGetterSignature, TsImportEqualsDeclaration, TsImportType, TsIndexSignature, TsIndexedAccessType, TsInferType, TsInstantiation, TsInterfaceBody, TsInterfaceDeclaration, TsIntersectionType, TsKeywordType, TsKeywordTypeKind, TsLiteral, TsLiteralType, TsMappedType, TsMethodSignature, TsModuleBlock, TsModuleDeclaration, TsModuleName, TsModuleReference, TsNamespaceBody, TsNamespaceDeclaration, TsNamespaceExportDeclaration, TsNonNullExpression, TsOptionalType, TsParameterProperty, TsParameterPropertyParameter, TsParenthesizedType, TsParserConfig, TsPropertySignature, TsQualifiedName, TsRestType, TsSatisfiesExpression, TsSetterSignature, TsTemplateLiteralType, TsThisType, TsThisTypeOrIdent, TsTupleElement, TsTupleType, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeLiteral, TsTypeOperator, TsTypeOperatorOp, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, TsTypePredicate, TsTypeQuery, TsTypeQueryExpr, TsTypeReference, TsUnionOrIntersectionType, TsUnionType, UmdConfig, UnaryExpression, UnaryOperator, UpdateExpression, UpdateOperator, VariableDeclaration, VariableDeclarationKind, VariableDeclarator, WhileStatement, WithStatement, YieldExpression };
|