oxlint 1.81.0 → 1.83.0
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/configuration_schema.json +104 -42
- package/dist/bindings.js +28 -30
- package/dist/index.d.ts +68 -26
- package/dist/lint.js +23 -37
- package/dist/plugins-dev.d.ts +1589 -1546
- package/dist/plugins-dev.js +3 -2
- package/dist/rolldown-runtime.js +21 -0
- package/package.json +20 -20
package/dist/plugins-dev.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-any.d.ts
|
|
2
2
|
/**
|
|
3
3
|
Returns a boolean for whether the given type is `any`.
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ const anyA = get(anyObject, 'a');
|
|
|
29
29
|
*/
|
|
30
30
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
32
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
33
33
|
/**
|
|
34
34
|
Returns a boolean for whether the given key is an optional key of type.
|
|
35
35
|
|
|
@@ -72,7 +72,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
72
72
|
*/
|
|
73
73
|
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
74
74
|
//#endregion
|
|
75
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
75
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
76
76
|
/**
|
|
77
77
|
Extract all optional keys from the given type.
|
|
78
78
|
|
|
@@ -110,7 +110,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
|
|
|
110
110
|
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never; }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
111
111
|
: never; // Should never happen
|
|
112
112
|
//#endregion
|
|
113
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
113
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
114
114
|
/**
|
|
115
115
|
Extract all required keys from the given type.
|
|
116
116
|
|
|
@@ -144,7 +144,7 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
144
144
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
145
145
|
? Exclude<keyof Type, OptionalKeysOf<Type>> : never; // Should never happen
|
|
146
146
|
//#endregion
|
|
147
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
147
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-never.d.ts
|
|
148
148
|
/**
|
|
149
149
|
Returns a boolean for whether the given type is `never`.
|
|
150
150
|
|
|
@@ -200,7 +200,7 @@ type B = IsTrueFixed<never>;
|
|
|
200
200
|
*/
|
|
201
201
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
202
202
|
//#endregion
|
|
203
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
203
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/if.d.ts
|
|
204
204
|
/**
|
|
205
205
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
206
206
|
|
|
@@ -295,7 +295,7 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
295
295
|
*/
|
|
296
296
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
297
297
|
//#endregion
|
|
298
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
298
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/type.d.ts
|
|
299
299
|
/**
|
|
300
300
|
An if-else-like type that resolves depending on whether the given type is `any` or `never`.
|
|
301
301
|
|
|
@@ -346,7 +346,7 @@ type IfNotAnyOrNever<T, Cases extends {
|
|
|
346
346
|
ifNever?: unknown;
|
|
347
347
|
}> = IsAny<T> extends true ? 'ifAny' extends keyof Cases ? Cases['ifAny'] : any : IsNever<T> extends true ? 'ifNever' extends keyof Cases ? Cases['ifNever'] : never : Cases['ifNot'];
|
|
348
348
|
//#endregion
|
|
349
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
349
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/simplify.d.ts
|
|
350
350
|
/**
|
|
351
351
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
352
352
|
|
|
@@ -407,7 +407,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
407
407
|
*/
|
|
408
408
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {};
|
|
409
409
|
//#endregion
|
|
410
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
410
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/is-equal.d.ts
|
|
411
411
|
/**
|
|
412
412
|
Returns a boolean for whether the two given types are equal.
|
|
413
413
|
|
|
@@ -438,7 +438,7 @@ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false
|
|
|
438
438
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
439
439
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
440
440
|
//#endregion
|
|
441
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
441
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
442
442
|
/**
|
|
443
443
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
444
444
|
|
|
@@ -532,7 +532,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
532
532
|
*/
|
|
533
533
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType]; };
|
|
534
534
|
//#endregion
|
|
535
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
535
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
536
536
|
/**
|
|
537
537
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
538
538
|
|
|
@@ -580,7 +580,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
580
580
|
*/
|
|
581
581
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType]; };
|
|
582
582
|
//#endregion
|
|
583
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
583
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/merge.d.ts
|
|
584
584
|
// Merges two objects without worrying about index signatures.
|
|
585
585
|
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>;
|
|
586
586
|
/**
|
|
@@ -651,7 +651,7 @@ type Merge<Destination, Source> = Destination extends unknown // For distributin
|
|
|
651
651
|
: never; // Should never happen
|
|
652
652
|
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
653
653
|
//#endregion
|
|
654
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
654
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/internal/object.d.ts
|
|
655
655
|
/**
|
|
656
656
|
Merges user specified options with default options.
|
|
657
657
|
|
|
@@ -708,7 +708,7 @@ type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<
|
|
|
708
708
|
) ? Result : never;
|
|
709
709
|
type _ApplyDefaultOptions<Options, Defaults, SpecifiedOptions> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Merge<Defaults, { [Key in keyof SpecifiedOptions as undefined extends Required<Options>[Key & keyof Options] ? Key : undefined extends SpecifiedOptions[Key] ? never : Key]: SpecifiedOptions[Key]; }>>>;
|
|
710
710
|
//#endregion
|
|
711
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
711
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/except.d.ts
|
|
712
712
|
/**
|
|
713
713
|
Filter out keys from an object.
|
|
714
714
|
|
|
@@ -808,7 +808,7 @@ type PostPayloadFixed = Except<UserData, 'email'>;
|
|
|
808
808
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
809
809
|
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType]; } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
810
810
|
//#endregion
|
|
811
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
811
|
+
//#region ../../node_modules/.pnpm/type-fest@5.9.0/node_modules/type-fest/source/require-at-least-one.d.ts
|
|
812
812
|
/**
|
|
813
813
|
Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
|
|
814
814
|
|
|
@@ -839,6 +839,248 @@ Key in KeysType]-?: Required<Pick<ObjectType, Key>> // 1. Make `Key`'s type requ
|
|
|
839
839
|
& Partial<Pick<ObjectType, Exclude<KeysType, Key>>> // 2. Make all other keys in `KeysType` optional
|
|
840
840
|
; }[KeysType] & Except<ObjectType, KeysType>; // 3. Add the remaining keys not in `KeysType`
|
|
841
841
|
//#endregion
|
|
842
|
+
//#region src-js/plugins/globals.d.ts
|
|
843
|
+
/**
|
|
844
|
+
* Globals for the file being linted.
|
|
845
|
+
*
|
|
846
|
+
* Globals are deserialized from JSON, so can only contain JSON-compatible values.
|
|
847
|
+
* Each global variable maps to "readonly", "writable", or "off".
|
|
848
|
+
*/
|
|
849
|
+
type Globals$1 = Record<string, "readonly" | "writable" | "off">;
|
|
850
|
+
/**
|
|
851
|
+
* Environments for the file being linted.
|
|
852
|
+
*
|
|
853
|
+
* Only includes environments that are enabled, so all properties are `true`.
|
|
854
|
+
*/
|
|
855
|
+
type Envs$1 = Record<string, true>;
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
|
|
858
|
+
// ==================================================================================================
|
|
859
|
+
// JSON Schema Draft 04
|
|
860
|
+
// ==================================================================================================
|
|
861
|
+
/**
|
|
862
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
|
|
863
|
+
*/
|
|
864
|
+
type JSONSchema4TypeName = "string" //
|
|
865
|
+
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
866
|
+
/**
|
|
867
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
|
|
868
|
+
*/
|
|
869
|
+
type JSONSchema4Type = string //
|
|
870
|
+
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
871
|
+
// Workaround for infinite type recursion
|
|
872
|
+
interface JSONSchema4Object {
|
|
873
|
+
[key: string]: JSONSchema4Type;
|
|
874
|
+
}
|
|
875
|
+
// Workaround for infinite type recursion
|
|
876
|
+
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
877
|
+
interface JSONSchema4Array extends Array<JSONSchema4Type> {}
|
|
878
|
+
/**
|
|
879
|
+
* Meta schema
|
|
880
|
+
*
|
|
881
|
+
* Recommended values:
|
|
882
|
+
* - 'http://json-schema.org/schema#'
|
|
883
|
+
* - 'http://json-schema.org/hyper-schema#'
|
|
884
|
+
* - 'http://json-schema.org/draft-04/schema#'
|
|
885
|
+
* - 'http://json-schema.org/draft-04/hyper-schema#'
|
|
886
|
+
* - 'http://json-schema.org/draft-03/schema#'
|
|
887
|
+
* - 'http://json-schema.org/draft-03/hyper-schema#'
|
|
888
|
+
*
|
|
889
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
|
890
|
+
*/
|
|
891
|
+
type JSONSchema4Version = string;
|
|
892
|
+
/**
|
|
893
|
+
* JSON Schema V4
|
|
894
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
|
|
895
|
+
*/
|
|
896
|
+
interface JSONSchema4 {
|
|
897
|
+
id?: string | undefined;
|
|
898
|
+
$ref?: string | undefined;
|
|
899
|
+
$schema?: JSONSchema4Version | undefined;
|
|
900
|
+
/**
|
|
901
|
+
* This attribute is a string that provides a short description of the
|
|
902
|
+
* instance property.
|
|
903
|
+
*
|
|
904
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
|
|
905
|
+
*/
|
|
906
|
+
title?: string | undefined;
|
|
907
|
+
/**
|
|
908
|
+
* This attribute is a string that provides a full description of the of
|
|
909
|
+
* purpose the instance property.
|
|
910
|
+
*
|
|
911
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
|
|
912
|
+
*/
|
|
913
|
+
description?: string | undefined;
|
|
914
|
+
default?: JSONSchema4Type | undefined;
|
|
915
|
+
multipleOf?: number | undefined;
|
|
916
|
+
maximum?: number | undefined;
|
|
917
|
+
exclusiveMaximum?: boolean | undefined;
|
|
918
|
+
minimum?: number | undefined;
|
|
919
|
+
exclusiveMinimum?: boolean | undefined;
|
|
920
|
+
maxLength?: number | undefined;
|
|
921
|
+
minLength?: number | undefined;
|
|
922
|
+
pattern?: string | undefined;
|
|
923
|
+
/**
|
|
924
|
+
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
|
|
925
|
+
*
|
|
926
|
+
* This provides a definition for additional items in an array instance
|
|
927
|
+
* when tuple definitions of the items is provided. This can be false
|
|
928
|
+
* to indicate additional items in the array are not allowed, or it can
|
|
929
|
+
* be a schema that defines the schema of the additional items.
|
|
930
|
+
*
|
|
931
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
|
|
932
|
+
*/
|
|
933
|
+
additionalItems?: boolean | JSONSchema4 | undefined;
|
|
934
|
+
/**
|
|
935
|
+
* This attribute defines the allowed items in an instance array, and
|
|
936
|
+
* MUST be a schema or an array of schemas. The default value is an
|
|
937
|
+
* empty schema which allows any value for items in the instance array.
|
|
938
|
+
*
|
|
939
|
+
* When this attribute value is a schema and the instance value is an
|
|
940
|
+
* array, then all the items in the array MUST be valid according to the
|
|
941
|
+
* schema.
|
|
942
|
+
*
|
|
943
|
+
* When this attribute value is an array of schemas and the instance
|
|
944
|
+
* value is an array, each position in the instance array MUST conform
|
|
945
|
+
* to the schema in the corresponding position for this array. This
|
|
946
|
+
* called tuple typing. When tuple typing is used, additional items are
|
|
947
|
+
* allowed, disallowed, or constrained by the "additionalItems"
|
|
948
|
+
* (Section 5.6) attribute using the same rules as
|
|
949
|
+
* "additionalProperties" (Section 5.4) for objects.
|
|
950
|
+
*
|
|
951
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
|
|
952
|
+
*/
|
|
953
|
+
items?: JSONSchema4 | JSONSchema4[] | undefined;
|
|
954
|
+
maxItems?: number | undefined;
|
|
955
|
+
minItems?: number | undefined;
|
|
956
|
+
uniqueItems?: boolean | undefined;
|
|
957
|
+
maxProperties?: number | undefined;
|
|
958
|
+
minProperties?: number | undefined;
|
|
959
|
+
/**
|
|
960
|
+
* This attribute indicates if the instance must have a value, and not
|
|
961
|
+
* be undefined. This is false by default, making the instance
|
|
962
|
+
* optional.
|
|
963
|
+
*
|
|
964
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
|
|
965
|
+
*/
|
|
966
|
+
required?: boolean | string[] | undefined;
|
|
967
|
+
/**
|
|
968
|
+
* This attribute defines a schema for all properties that are not
|
|
969
|
+
* explicitly defined in an object type definition. If specified, the
|
|
970
|
+
* value MUST be a schema or a boolean. If false is provided, no
|
|
971
|
+
* additional properties are allowed beyond the properties defined in
|
|
972
|
+
* the schema. The default value is an empty schema which allows any
|
|
973
|
+
* value for additional properties.
|
|
974
|
+
*
|
|
975
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
|
|
976
|
+
*/
|
|
977
|
+
additionalProperties?: boolean | JSONSchema4 | undefined;
|
|
978
|
+
definitions?: {
|
|
979
|
+
[k: string]: JSONSchema4;
|
|
980
|
+
} | undefined;
|
|
981
|
+
/**
|
|
982
|
+
* This attribute is an object with property definitions that define the
|
|
983
|
+
* valid values of instance object property values. When the instance
|
|
984
|
+
* value is an object, the property values of the instance object MUST
|
|
985
|
+
* conform to the property definitions in this object. In this object,
|
|
986
|
+
* each property definition's value MUST be a schema, and the property's
|
|
987
|
+
* name MUST be the name of the instance property that it defines. The
|
|
988
|
+
* instance property value MUST be valid according to the schema from
|
|
989
|
+
* the property definition. Properties are considered unordered, the
|
|
990
|
+
* order of the instance properties MAY be in any order.
|
|
991
|
+
*
|
|
992
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
|
|
993
|
+
*/
|
|
994
|
+
properties?: {
|
|
995
|
+
[k: string]: JSONSchema4;
|
|
996
|
+
} | undefined;
|
|
997
|
+
/**
|
|
998
|
+
* This attribute is an object that defines the schema for a set of
|
|
999
|
+
* property names of an object instance. The name of each property of
|
|
1000
|
+
* this attribute's object is a regular expression pattern in the ECMA
|
|
1001
|
+
* 262/Perl 5 format, while the value is a schema. If the pattern
|
|
1002
|
+
* matches the name of a property on the instance object, the value of
|
|
1003
|
+
* the instance's property MUST be valid against the pattern name's
|
|
1004
|
+
* schema value.
|
|
1005
|
+
*
|
|
1006
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
|
|
1007
|
+
*/
|
|
1008
|
+
patternProperties?: {
|
|
1009
|
+
[k: string]: JSONSchema4;
|
|
1010
|
+
} | undefined;
|
|
1011
|
+
dependencies?: {
|
|
1012
|
+
[k: string]: JSONSchema4 | string[];
|
|
1013
|
+
} | undefined;
|
|
1014
|
+
/**
|
|
1015
|
+
* This provides an enumeration of all possible values that are valid
|
|
1016
|
+
* for the instance property. This MUST be an array, and each item in
|
|
1017
|
+
* the array represents a possible value for the instance value. If
|
|
1018
|
+
* this attribute is defined, the instance value MUST be one of the
|
|
1019
|
+
* values in the array in order for the schema to be valid.
|
|
1020
|
+
*
|
|
1021
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
|
|
1022
|
+
*/
|
|
1023
|
+
enum?: JSONSchema4Type[] | undefined;
|
|
1024
|
+
/**
|
|
1025
|
+
* A single type, or a union of simple types
|
|
1026
|
+
*/
|
|
1027
|
+
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
|
|
1028
|
+
allOf?: JSONSchema4[] | undefined;
|
|
1029
|
+
anyOf?: JSONSchema4[] | undefined;
|
|
1030
|
+
oneOf?: JSONSchema4[] | undefined;
|
|
1031
|
+
not?: JSONSchema4 | undefined;
|
|
1032
|
+
/**
|
|
1033
|
+
* The value of this property MUST be another schema which will provide
|
|
1034
|
+
* a base schema which the current schema will inherit from. The
|
|
1035
|
+
* inheritance rules are such that any instance that is valid according
|
|
1036
|
+
* to the current schema MUST be valid according to the referenced
|
|
1037
|
+
* schema. This MAY also be an array, in which case, the instance MUST
|
|
1038
|
+
* be valid for all the schemas in the array. A schema that extends
|
|
1039
|
+
* another schema MAY define additional attributes, constrain existing
|
|
1040
|
+
* attributes, or add other constraints.
|
|
1041
|
+
*
|
|
1042
|
+
* Conceptually, the behavior of extends can be seen as validating an
|
|
1043
|
+
* instance against all constraints in the extending schema as well as
|
|
1044
|
+
* the extended schema(s).
|
|
1045
|
+
*
|
|
1046
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
|
|
1047
|
+
*/
|
|
1048
|
+
extends?: string | string[] | undefined;
|
|
1049
|
+
/**
|
|
1050
|
+
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
|
|
1051
|
+
*/
|
|
1052
|
+
[k: string]: any;
|
|
1053
|
+
format?: string | undefined;
|
|
1054
|
+
}
|
|
1055
|
+
//#endregion
|
|
1056
|
+
//#region src-js/plugins/json.d.ts
|
|
1057
|
+
/**
|
|
1058
|
+
* A JSON value.
|
|
1059
|
+
*/
|
|
1060
|
+
type JsonValue = JsonObject | JsonValue[] | string | number | boolean | null;
|
|
1061
|
+
/**
|
|
1062
|
+
* A JSON object.
|
|
1063
|
+
*/
|
|
1064
|
+
type JsonObject = {
|
|
1065
|
+
[key: string]: JsonValue;
|
|
1066
|
+
};
|
|
1067
|
+
//#endregion
|
|
1068
|
+
//#region src-js/plugins/options.d.ts
|
|
1069
|
+
/**
|
|
1070
|
+
* Options for a rule on a file.
|
|
1071
|
+
*/
|
|
1072
|
+
type Options = JsonValue[];
|
|
1073
|
+
/**
|
|
1074
|
+
* Schema describing valid options for a rule.
|
|
1075
|
+
* `schema` property of `RuleMeta`.
|
|
1076
|
+
*
|
|
1077
|
+
* Can be one of:
|
|
1078
|
+
* - `JSONSchema4` - Full JSON Schema object (must have `type: "array"` at root).
|
|
1079
|
+
* - `JSONSchema4[]` - Array shorthand where each element describes corresponding options element.
|
|
1080
|
+
* - `false` - Opts out of schema validation (not recommended).
|
|
1081
|
+
*/
|
|
1082
|
+
type RuleOptionsSchema = JSONSchema4 | JSONSchema4[] | false;
|
|
1083
|
+
//#endregion
|
|
842
1084
|
//#region src-js/plugins/tokens.d.ts
|
|
843
1085
|
/**
|
|
844
1086
|
* AST token type.
|
|
@@ -890,424 +1132,6 @@ interface TemplateToken extends BaseToken {
|
|
|
890
1132
|
type: "Template";
|
|
891
1133
|
}
|
|
892
1134
|
//#endregion
|
|
893
|
-
//#region src-js/generated/visitor.d.ts
|
|
894
|
-
// To understand why we need the "Bivariance hack", see: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/20219
|
|
895
|
-
// For downsides, see: https://github.com/oxc-project/oxc/issues/18154#issuecomment-4012955607
|
|
896
|
-
type BivarianceHackHandler<Handler extends (...args: any) => any> = {
|
|
897
|
-
bivarianceHack(...args: Parameters<Handler>): ReturnType<Handler>;
|
|
898
|
-
}["bivarianceHack"];
|
|
899
|
-
interface StrictVisitorObject {
|
|
900
|
-
DebuggerStatement?: (node: DebuggerStatement) => void;
|
|
901
|
-
"DebuggerStatement:exit"?: (node: DebuggerStatement) => void;
|
|
902
|
-
EmptyStatement?: (node: EmptyStatement) => void;
|
|
903
|
-
"EmptyStatement:exit"?: (node: EmptyStatement) => void;
|
|
904
|
-
Literal?: (node: BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral) => void;
|
|
905
|
-
"Literal:exit"?: (node: BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral) => void;
|
|
906
|
-
PrivateIdentifier?: (node: PrivateIdentifier) => void;
|
|
907
|
-
"PrivateIdentifier:exit"?: (node: PrivateIdentifier) => void;
|
|
908
|
-
Super?: (node: Super) => void;
|
|
909
|
-
"Super:exit"?: (node: Super) => void;
|
|
910
|
-
TemplateElement?: (node: TemplateElement) => void;
|
|
911
|
-
"TemplateElement:exit"?: (node: TemplateElement) => void;
|
|
912
|
-
ThisExpression?: (node: ThisExpression) => void;
|
|
913
|
-
"ThisExpression:exit"?: (node: ThisExpression) => void;
|
|
914
|
-
JSXClosingFragment?: (node: JSXClosingFragment) => void;
|
|
915
|
-
"JSXClosingFragment:exit"?: (node: JSXClosingFragment) => void;
|
|
916
|
-
JSXEmptyExpression?: (node: JSXEmptyExpression) => void;
|
|
917
|
-
"JSXEmptyExpression:exit"?: (node: JSXEmptyExpression) => void;
|
|
918
|
-
JSXIdentifier?: (node: JSXIdentifier) => void;
|
|
919
|
-
"JSXIdentifier:exit"?: (node: JSXIdentifier) => void;
|
|
920
|
-
JSXOpeningFragment?: (node: JSXOpeningFragment) => void;
|
|
921
|
-
"JSXOpeningFragment:exit"?: (node: JSXOpeningFragment) => void;
|
|
922
|
-
JSXText?: (node: JSXText) => void;
|
|
923
|
-
"JSXText:exit"?: (node: JSXText) => void;
|
|
924
|
-
TSAnyKeyword?: (node: TSAnyKeyword) => void;
|
|
925
|
-
"TSAnyKeyword:exit"?: (node: TSAnyKeyword) => void;
|
|
926
|
-
TSBigIntKeyword?: (node: TSBigIntKeyword) => void;
|
|
927
|
-
"TSBigIntKeyword:exit"?: (node: TSBigIntKeyword) => void;
|
|
928
|
-
TSBooleanKeyword?: (node: TSBooleanKeyword) => void;
|
|
929
|
-
"TSBooleanKeyword:exit"?: (node: TSBooleanKeyword) => void;
|
|
930
|
-
TSIntrinsicKeyword?: (node: TSIntrinsicKeyword) => void;
|
|
931
|
-
"TSIntrinsicKeyword:exit"?: (node: TSIntrinsicKeyword) => void;
|
|
932
|
-
TSJSDocUnknownType?: (node: JSDocUnknownType) => void;
|
|
933
|
-
"TSJSDocUnknownType:exit"?: (node: JSDocUnknownType) => void;
|
|
934
|
-
TSNeverKeyword?: (node: TSNeverKeyword) => void;
|
|
935
|
-
"TSNeverKeyword:exit"?: (node: TSNeverKeyword) => void;
|
|
936
|
-
TSNullKeyword?: (node: TSNullKeyword) => void;
|
|
937
|
-
"TSNullKeyword:exit"?: (node: TSNullKeyword) => void;
|
|
938
|
-
TSNumberKeyword?: (node: TSNumberKeyword) => void;
|
|
939
|
-
"TSNumberKeyword:exit"?: (node: TSNumberKeyword) => void;
|
|
940
|
-
TSObjectKeyword?: (node: TSObjectKeyword) => void;
|
|
941
|
-
"TSObjectKeyword:exit"?: (node: TSObjectKeyword) => void;
|
|
942
|
-
TSStringKeyword?: (node: TSStringKeyword) => void;
|
|
943
|
-
"TSStringKeyword:exit"?: (node: TSStringKeyword) => void;
|
|
944
|
-
TSSymbolKeyword?: (node: TSSymbolKeyword) => void;
|
|
945
|
-
"TSSymbolKeyword:exit"?: (node: TSSymbolKeyword) => void;
|
|
946
|
-
TSThisType?: (node: TSThisType) => void;
|
|
947
|
-
"TSThisType:exit"?: (node: TSThisType) => void;
|
|
948
|
-
TSUndefinedKeyword?: (node: TSUndefinedKeyword) => void;
|
|
949
|
-
"TSUndefinedKeyword:exit"?: (node: TSUndefinedKeyword) => void;
|
|
950
|
-
TSUnknownKeyword?: (node: TSUnknownKeyword) => void;
|
|
951
|
-
"TSUnknownKeyword:exit"?: (node: TSUnknownKeyword) => void;
|
|
952
|
-
TSVoidKeyword?: (node: TSVoidKeyword) => void;
|
|
953
|
-
"TSVoidKeyword:exit"?: (node: TSVoidKeyword) => void;
|
|
954
|
-
AccessorProperty?: (node: AccessorProperty) => void;
|
|
955
|
-
"AccessorProperty:exit"?: (node: AccessorProperty) => void;
|
|
956
|
-
ArrayExpression?: (node: ArrayExpression) => void;
|
|
957
|
-
"ArrayExpression:exit"?: (node: ArrayExpression) => void;
|
|
958
|
-
ArrayPattern?: (node: ArrayPattern) => void;
|
|
959
|
-
"ArrayPattern:exit"?: (node: ArrayPattern) => void;
|
|
960
|
-
ArrowFunctionExpression?: (node: ArrowFunctionExpression) => void;
|
|
961
|
-
"ArrowFunctionExpression:exit"?: (node: ArrowFunctionExpression) => void;
|
|
962
|
-
AssignmentExpression?: (node: AssignmentExpression) => void;
|
|
963
|
-
"AssignmentExpression:exit"?: (node: AssignmentExpression) => void;
|
|
964
|
-
AssignmentPattern?: (node: AssignmentPattern) => void;
|
|
965
|
-
"AssignmentPattern:exit"?: (node: AssignmentPattern) => void;
|
|
966
|
-
AwaitExpression?: (node: AwaitExpression) => void;
|
|
967
|
-
"AwaitExpression:exit"?: (node: AwaitExpression) => void;
|
|
968
|
-
BinaryExpression?: (node: BinaryExpression) => void;
|
|
969
|
-
"BinaryExpression:exit"?: (node: BinaryExpression) => void;
|
|
970
|
-
BlockStatement?: (node: BlockStatement) => void;
|
|
971
|
-
"BlockStatement:exit"?: (node: BlockStatement) => void;
|
|
972
|
-
BreakStatement?: (node: BreakStatement) => void;
|
|
973
|
-
"BreakStatement:exit"?: (node: BreakStatement) => void;
|
|
974
|
-
CallExpression?: (node: CallExpression) => void;
|
|
975
|
-
"CallExpression:exit"?: (node: CallExpression) => void;
|
|
976
|
-
CatchClause?: (node: CatchClause) => void;
|
|
977
|
-
"CatchClause:exit"?: (node: CatchClause) => void;
|
|
978
|
-
ChainExpression?: (node: ChainExpression) => void;
|
|
979
|
-
"ChainExpression:exit"?: (node: ChainExpression) => void;
|
|
980
|
-
ClassBody?: (node: ClassBody) => void;
|
|
981
|
-
"ClassBody:exit"?: (node: ClassBody) => void;
|
|
982
|
-
ClassDeclaration?: (node: Class) => void;
|
|
983
|
-
"ClassDeclaration:exit"?: (node: Class) => void;
|
|
984
|
-
ClassExpression?: (node: Class) => void;
|
|
985
|
-
"ClassExpression:exit"?: (node: Class) => void;
|
|
986
|
-
ConditionalExpression?: (node: ConditionalExpression) => void;
|
|
987
|
-
"ConditionalExpression:exit"?: (node: ConditionalExpression) => void;
|
|
988
|
-
ContinueStatement?: (node: ContinueStatement) => void;
|
|
989
|
-
"ContinueStatement:exit"?: (node: ContinueStatement) => void;
|
|
990
|
-
Decorator?: (node: Decorator) => void;
|
|
991
|
-
"Decorator:exit"?: (node: Decorator) => void;
|
|
992
|
-
DoWhileStatement?: (node: DoWhileStatement) => void;
|
|
993
|
-
"DoWhileStatement:exit"?: (node: DoWhileStatement) => void;
|
|
994
|
-
ExportAllDeclaration?: (node: ExportAllDeclaration) => void;
|
|
995
|
-
"ExportAllDeclaration:exit"?: (node: ExportAllDeclaration) => void;
|
|
996
|
-
ExportDefaultDeclaration?: (node: ExportDefaultDeclaration) => void;
|
|
997
|
-
"ExportDefaultDeclaration:exit"?: (node: ExportDefaultDeclaration) => void;
|
|
998
|
-
ExportNamedDeclaration?: (node: ExportNamedDeclaration) => void;
|
|
999
|
-
"ExportNamedDeclaration:exit"?: (node: ExportNamedDeclaration) => void;
|
|
1000
|
-
ExportSpecifier?: (node: ExportSpecifier) => void;
|
|
1001
|
-
"ExportSpecifier:exit"?: (node: ExportSpecifier) => void;
|
|
1002
|
-
ExpressionStatement?: (node: ExpressionStatement) => void;
|
|
1003
|
-
"ExpressionStatement:exit"?: (node: ExpressionStatement) => void;
|
|
1004
|
-
ForInStatement?: (node: ForInStatement) => void;
|
|
1005
|
-
"ForInStatement:exit"?: (node: ForInStatement) => void;
|
|
1006
|
-
ForOfStatement?: (node: ForOfStatement) => void;
|
|
1007
|
-
"ForOfStatement:exit"?: (node: ForOfStatement) => void;
|
|
1008
|
-
ForStatement?: (node: ForStatement) => void;
|
|
1009
|
-
"ForStatement:exit"?: (node: ForStatement) => void;
|
|
1010
|
-
FunctionDeclaration?: (node: Function$1) => void;
|
|
1011
|
-
"FunctionDeclaration:exit"?: (node: Function$1) => void;
|
|
1012
|
-
FunctionExpression?: (node: Function$1) => void;
|
|
1013
|
-
"FunctionExpression:exit"?: (node: Function$1) => void;
|
|
1014
|
-
Identifier?: (node: IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName) => void;
|
|
1015
|
-
"Identifier:exit"?: (node: IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName) => void;
|
|
1016
|
-
IfStatement?: (node: IfStatement) => void;
|
|
1017
|
-
"IfStatement:exit"?: (node: IfStatement) => void;
|
|
1018
|
-
ImportAttribute?: (node: ImportAttribute) => void;
|
|
1019
|
-
"ImportAttribute:exit"?: (node: ImportAttribute) => void;
|
|
1020
|
-
ImportDeclaration?: (node: ImportDeclaration) => void;
|
|
1021
|
-
"ImportDeclaration:exit"?: (node: ImportDeclaration) => void;
|
|
1022
|
-
ImportDefaultSpecifier?: (node: ImportDefaultSpecifier) => void;
|
|
1023
|
-
"ImportDefaultSpecifier:exit"?: (node: ImportDefaultSpecifier) => void;
|
|
1024
|
-
ImportExpression?: (node: ImportExpression) => void;
|
|
1025
|
-
"ImportExpression:exit"?: (node: ImportExpression) => void;
|
|
1026
|
-
ImportNamespaceSpecifier?: (node: ImportNamespaceSpecifier) => void;
|
|
1027
|
-
"ImportNamespaceSpecifier:exit"?: (node: ImportNamespaceSpecifier) => void;
|
|
1028
|
-
ImportSpecifier?: (node: ImportSpecifier) => void;
|
|
1029
|
-
"ImportSpecifier:exit"?: (node: ImportSpecifier) => void;
|
|
1030
|
-
LabeledStatement?: (node: LabeledStatement) => void;
|
|
1031
|
-
"LabeledStatement:exit"?: (node: LabeledStatement) => void;
|
|
1032
|
-
LogicalExpression?: (node: LogicalExpression) => void;
|
|
1033
|
-
"LogicalExpression:exit"?: (node: LogicalExpression) => void;
|
|
1034
|
-
MemberExpression?: (node: MemberExpression) => void;
|
|
1035
|
-
"MemberExpression:exit"?: (node: MemberExpression) => void;
|
|
1036
|
-
MetaProperty?: (node: MetaProperty) => void;
|
|
1037
|
-
"MetaProperty:exit"?: (node: MetaProperty) => void;
|
|
1038
|
-
MethodDefinition?: (node: MethodDefinition) => void;
|
|
1039
|
-
"MethodDefinition:exit"?: (node: MethodDefinition) => void;
|
|
1040
|
-
NewExpression?: (node: NewExpression) => void;
|
|
1041
|
-
"NewExpression:exit"?: (node: NewExpression) => void;
|
|
1042
|
-
ObjectExpression?: (node: ObjectExpression) => void;
|
|
1043
|
-
"ObjectExpression:exit"?: (node: ObjectExpression) => void;
|
|
1044
|
-
ObjectPattern?: (node: ObjectPattern) => void;
|
|
1045
|
-
"ObjectPattern:exit"?: (node: ObjectPattern) => void;
|
|
1046
|
-
ParenthesizedExpression?: (node: ParenthesizedExpression) => void;
|
|
1047
|
-
"ParenthesizedExpression:exit"?: (node: ParenthesizedExpression) => void;
|
|
1048
|
-
Program?: (node: Program) => void;
|
|
1049
|
-
"Program:exit"?: (node: Program) => void;
|
|
1050
|
-
Property?: (node: ObjectProperty | AssignmentTargetProperty | AssignmentTargetPropertyProperty | BindingProperty) => void;
|
|
1051
|
-
"Property:exit"?: (node: ObjectProperty | AssignmentTargetProperty | AssignmentTargetPropertyProperty | BindingProperty) => void;
|
|
1052
|
-
PropertyDefinition?: (node: PropertyDefinition) => void;
|
|
1053
|
-
"PropertyDefinition:exit"?: (node: PropertyDefinition) => void;
|
|
1054
|
-
RestElement?: (node: AssignmentTargetRest | BindingRestElement | FormalParameterRest) => void;
|
|
1055
|
-
"RestElement:exit"?: (node: AssignmentTargetRest | BindingRestElement | FormalParameterRest) => void;
|
|
1056
|
-
ReturnStatement?: (node: ReturnStatement) => void;
|
|
1057
|
-
"ReturnStatement:exit"?: (node: ReturnStatement) => void;
|
|
1058
|
-
SequenceExpression?: (node: SequenceExpression) => void;
|
|
1059
|
-
"SequenceExpression:exit"?: (node: SequenceExpression) => void;
|
|
1060
|
-
SpreadElement?: (node: SpreadElement) => void;
|
|
1061
|
-
"SpreadElement:exit"?: (node: SpreadElement) => void;
|
|
1062
|
-
StaticBlock?: (node: StaticBlock) => void;
|
|
1063
|
-
"StaticBlock:exit"?: (node: StaticBlock) => void;
|
|
1064
|
-
SwitchCase?: (node: SwitchCase) => void;
|
|
1065
|
-
"SwitchCase:exit"?: (node: SwitchCase) => void;
|
|
1066
|
-
SwitchStatement?: (node: SwitchStatement) => void;
|
|
1067
|
-
"SwitchStatement:exit"?: (node: SwitchStatement) => void;
|
|
1068
|
-
TaggedTemplateExpression?: (node: TaggedTemplateExpression) => void;
|
|
1069
|
-
"TaggedTemplateExpression:exit"?: (node: TaggedTemplateExpression) => void;
|
|
1070
|
-
TemplateLiteral?: (node: TemplateLiteral) => void;
|
|
1071
|
-
"TemplateLiteral:exit"?: (node: TemplateLiteral) => void;
|
|
1072
|
-
ThrowStatement?: (node: ThrowStatement) => void;
|
|
1073
|
-
"ThrowStatement:exit"?: (node: ThrowStatement) => void;
|
|
1074
|
-
TryStatement?: (node: TryStatement) => void;
|
|
1075
|
-
"TryStatement:exit"?: (node: TryStatement) => void;
|
|
1076
|
-
UnaryExpression?: (node: UnaryExpression) => void;
|
|
1077
|
-
"UnaryExpression:exit"?: (node: UnaryExpression) => void;
|
|
1078
|
-
UpdateExpression?: (node: UpdateExpression) => void;
|
|
1079
|
-
"UpdateExpression:exit"?: (node: UpdateExpression) => void;
|
|
1080
|
-
V8IntrinsicExpression?: (node: V8IntrinsicExpression) => void;
|
|
1081
|
-
"V8IntrinsicExpression:exit"?: (node: V8IntrinsicExpression) => void;
|
|
1082
|
-
VariableDeclaration?: (node: VariableDeclaration) => void;
|
|
1083
|
-
"VariableDeclaration:exit"?: (node: VariableDeclaration) => void;
|
|
1084
|
-
VariableDeclarator?: (node: VariableDeclarator) => void;
|
|
1085
|
-
"VariableDeclarator:exit"?: (node: VariableDeclarator) => void;
|
|
1086
|
-
WhileStatement?: (node: WhileStatement) => void;
|
|
1087
|
-
"WhileStatement:exit"?: (node: WhileStatement) => void;
|
|
1088
|
-
WithStatement?: (node: WithStatement) => void;
|
|
1089
|
-
"WithStatement:exit"?: (node: WithStatement) => void;
|
|
1090
|
-
YieldExpression?: (node: YieldExpression) => void;
|
|
1091
|
-
"YieldExpression:exit"?: (node: YieldExpression) => void;
|
|
1092
|
-
JSXAttribute?: (node: JSXAttribute) => void;
|
|
1093
|
-
"JSXAttribute:exit"?: (node: JSXAttribute) => void;
|
|
1094
|
-
JSXClosingElement?: (node: JSXClosingElement) => void;
|
|
1095
|
-
"JSXClosingElement:exit"?: (node: JSXClosingElement) => void;
|
|
1096
|
-
JSXElement?: (node: JSXElement) => void;
|
|
1097
|
-
"JSXElement:exit"?: (node: JSXElement) => void;
|
|
1098
|
-
JSXExpressionContainer?: (node: JSXExpressionContainer) => void;
|
|
1099
|
-
"JSXExpressionContainer:exit"?: (node: JSXExpressionContainer) => void;
|
|
1100
|
-
JSXFragment?: (node: JSXFragment) => void;
|
|
1101
|
-
"JSXFragment:exit"?: (node: JSXFragment) => void;
|
|
1102
|
-
JSXMemberExpression?: (node: JSXMemberExpression) => void;
|
|
1103
|
-
"JSXMemberExpression:exit"?: (node: JSXMemberExpression) => void;
|
|
1104
|
-
JSXNamespacedName?: (node: JSXNamespacedName) => void;
|
|
1105
|
-
"JSXNamespacedName:exit"?: (node: JSXNamespacedName) => void;
|
|
1106
|
-
JSXOpeningElement?: (node: JSXOpeningElement) => void;
|
|
1107
|
-
"JSXOpeningElement:exit"?: (node: JSXOpeningElement) => void;
|
|
1108
|
-
JSXSpreadAttribute?: (node: JSXSpreadAttribute) => void;
|
|
1109
|
-
"JSXSpreadAttribute:exit"?: (node: JSXSpreadAttribute) => void;
|
|
1110
|
-
JSXSpreadChild?: (node: JSXSpreadChild) => void;
|
|
1111
|
-
"JSXSpreadChild:exit"?: (node: JSXSpreadChild) => void;
|
|
1112
|
-
TSAbstractAccessorProperty?: (node: AccessorProperty) => void;
|
|
1113
|
-
"TSAbstractAccessorProperty:exit"?: (node: AccessorProperty) => void;
|
|
1114
|
-
TSAbstractMethodDefinition?: (node: MethodDefinition) => void;
|
|
1115
|
-
"TSAbstractMethodDefinition:exit"?: (node: MethodDefinition) => void;
|
|
1116
|
-
TSAbstractPropertyDefinition?: (node: PropertyDefinition) => void;
|
|
1117
|
-
"TSAbstractPropertyDefinition:exit"?: (node: PropertyDefinition) => void;
|
|
1118
|
-
TSArrayType?: (node: TSArrayType) => void;
|
|
1119
|
-
"TSArrayType:exit"?: (node: TSArrayType) => void;
|
|
1120
|
-
TSAsExpression?: (node: TSAsExpression) => void;
|
|
1121
|
-
"TSAsExpression:exit"?: (node: TSAsExpression) => void;
|
|
1122
|
-
TSCallSignatureDeclaration?: (node: TSCallSignatureDeclaration) => void;
|
|
1123
|
-
"TSCallSignatureDeclaration:exit"?: (node: TSCallSignatureDeclaration) => void;
|
|
1124
|
-
TSClassImplements?: (node: TSClassImplements) => void;
|
|
1125
|
-
"TSClassImplements:exit"?: (node: TSClassImplements) => void;
|
|
1126
|
-
TSConditionalType?: (node: TSConditionalType) => void;
|
|
1127
|
-
"TSConditionalType:exit"?: (node: TSConditionalType) => void;
|
|
1128
|
-
TSConstructSignatureDeclaration?: (node: TSConstructSignatureDeclaration) => void;
|
|
1129
|
-
"TSConstructSignatureDeclaration:exit"?: (node: TSConstructSignatureDeclaration) => void;
|
|
1130
|
-
TSConstructorType?: (node: TSConstructorType) => void;
|
|
1131
|
-
"TSConstructorType:exit"?: (node: TSConstructorType) => void;
|
|
1132
|
-
TSDeclareFunction?: (node: Function$1) => void;
|
|
1133
|
-
"TSDeclareFunction:exit"?: (node: Function$1) => void;
|
|
1134
|
-
TSEmptyBodyFunctionExpression?: (node: Function$1) => void;
|
|
1135
|
-
"TSEmptyBodyFunctionExpression:exit"?: (node: Function$1) => void;
|
|
1136
|
-
TSEnumBody?: (node: TSEnumBody) => void;
|
|
1137
|
-
"TSEnumBody:exit"?: (node: TSEnumBody) => void;
|
|
1138
|
-
TSEnumDeclaration?: (node: TSEnumDeclaration) => void;
|
|
1139
|
-
"TSEnumDeclaration:exit"?: (node: TSEnumDeclaration) => void;
|
|
1140
|
-
TSEnumMember?: (node: TSEnumMember) => void;
|
|
1141
|
-
"TSEnumMember:exit"?: (node: TSEnumMember) => void;
|
|
1142
|
-
TSExportAssignment?: (node: TSExportAssignment) => void;
|
|
1143
|
-
"TSExportAssignment:exit"?: (node: TSExportAssignment) => void;
|
|
1144
|
-
TSExternalModuleReference?: (node: TSExternalModuleReference) => void;
|
|
1145
|
-
"TSExternalModuleReference:exit"?: (node: TSExternalModuleReference) => void;
|
|
1146
|
-
TSFunctionType?: (node: TSFunctionType) => void;
|
|
1147
|
-
"TSFunctionType:exit"?: (node: TSFunctionType) => void;
|
|
1148
|
-
TSImportEqualsDeclaration?: (node: TSImportEqualsDeclaration) => void;
|
|
1149
|
-
"TSImportEqualsDeclaration:exit"?: (node: TSImportEqualsDeclaration) => void;
|
|
1150
|
-
TSImportType?: (node: TSImportType) => void;
|
|
1151
|
-
"TSImportType:exit"?: (node: TSImportType) => void;
|
|
1152
|
-
TSIndexSignature?: (node: TSIndexSignature) => void;
|
|
1153
|
-
"TSIndexSignature:exit"?: (node: TSIndexSignature) => void;
|
|
1154
|
-
TSIndexedAccessType?: (node: TSIndexedAccessType) => void;
|
|
1155
|
-
"TSIndexedAccessType:exit"?: (node: TSIndexedAccessType) => void;
|
|
1156
|
-
TSInferType?: (node: TSInferType) => void;
|
|
1157
|
-
"TSInferType:exit"?: (node: TSInferType) => void;
|
|
1158
|
-
TSInstantiationExpression?: (node: TSInstantiationExpression) => void;
|
|
1159
|
-
"TSInstantiationExpression:exit"?: (node: TSInstantiationExpression) => void;
|
|
1160
|
-
TSInterfaceBody?: (node: TSInterfaceBody) => void;
|
|
1161
|
-
"TSInterfaceBody:exit"?: (node: TSInterfaceBody) => void;
|
|
1162
|
-
TSInterfaceDeclaration?: (node: TSInterfaceDeclaration) => void;
|
|
1163
|
-
"TSInterfaceDeclaration:exit"?: (node: TSInterfaceDeclaration) => void;
|
|
1164
|
-
TSInterfaceHeritage?: (node: TSInterfaceHeritage) => void;
|
|
1165
|
-
"TSInterfaceHeritage:exit"?: (node: TSInterfaceHeritage) => void;
|
|
1166
|
-
TSIntersectionType?: (node: TSIntersectionType) => void;
|
|
1167
|
-
"TSIntersectionType:exit"?: (node: TSIntersectionType) => void;
|
|
1168
|
-
TSJSDocNonNullableType?: (node: JSDocNonNullableType) => void;
|
|
1169
|
-
"TSJSDocNonNullableType:exit"?: (node: JSDocNonNullableType) => void;
|
|
1170
|
-
TSJSDocNullableType?: (node: JSDocNullableType) => void;
|
|
1171
|
-
"TSJSDocNullableType:exit"?: (node: JSDocNullableType) => void;
|
|
1172
|
-
TSLiteralType?: (node: TSLiteralType) => void;
|
|
1173
|
-
"TSLiteralType:exit"?: (node: TSLiteralType) => void;
|
|
1174
|
-
TSMappedType?: (node: TSMappedType) => void;
|
|
1175
|
-
"TSMappedType:exit"?: (node: TSMappedType) => void;
|
|
1176
|
-
TSMethodSignature?: (node: TSMethodSignature) => void;
|
|
1177
|
-
"TSMethodSignature:exit"?: (node: TSMethodSignature) => void;
|
|
1178
|
-
TSModuleBlock?: (node: TSModuleBlock) => void;
|
|
1179
|
-
"TSModuleBlock:exit"?: (node: TSModuleBlock) => void;
|
|
1180
|
-
TSModuleDeclaration?: (node: TSModuleDeclaration | TSGlobalDeclaration) => void;
|
|
1181
|
-
"TSModuleDeclaration:exit"?: (node: TSModuleDeclaration | TSGlobalDeclaration) => void;
|
|
1182
|
-
TSNamedTupleMember?: (node: TSNamedTupleMember) => void;
|
|
1183
|
-
"TSNamedTupleMember:exit"?: (node: TSNamedTupleMember) => void;
|
|
1184
|
-
TSNamespaceExportDeclaration?: (node: TSNamespaceExportDeclaration) => void;
|
|
1185
|
-
"TSNamespaceExportDeclaration:exit"?: (node: TSNamespaceExportDeclaration) => void;
|
|
1186
|
-
TSNonNullExpression?: (node: TSNonNullExpression) => void;
|
|
1187
|
-
"TSNonNullExpression:exit"?: (node: TSNonNullExpression) => void;
|
|
1188
|
-
TSOptionalType?: (node: TSOptionalType) => void;
|
|
1189
|
-
"TSOptionalType:exit"?: (node: TSOptionalType) => void;
|
|
1190
|
-
TSParameterProperty?: (node: TSParameterProperty) => void;
|
|
1191
|
-
"TSParameterProperty:exit"?: (node: TSParameterProperty) => void;
|
|
1192
|
-
TSParenthesizedType?: (node: TSParenthesizedType) => void;
|
|
1193
|
-
"TSParenthesizedType:exit"?: (node: TSParenthesizedType) => void;
|
|
1194
|
-
TSPropertySignature?: (node: TSPropertySignature) => void;
|
|
1195
|
-
"TSPropertySignature:exit"?: (node: TSPropertySignature) => void;
|
|
1196
|
-
TSQualifiedName?: (node: TSQualifiedName) => void;
|
|
1197
|
-
"TSQualifiedName:exit"?: (node: TSQualifiedName) => void;
|
|
1198
|
-
TSRestType?: (node: TSRestType) => void;
|
|
1199
|
-
"TSRestType:exit"?: (node: TSRestType) => void;
|
|
1200
|
-
TSSatisfiesExpression?: (node: TSSatisfiesExpression) => void;
|
|
1201
|
-
"TSSatisfiesExpression:exit"?: (node: TSSatisfiesExpression) => void;
|
|
1202
|
-
TSTemplateLiteralType?: (node: TSTemplateLiteralType) => void;
|
|
1203
|
-
"TSTemplateLiteralType:exit"?: (node: TSTemplateLiteralType) => void;
|
|
1204
|
-
TSTupleType?: (node: TSTupleType) => void;
|
|
1205
|
-
"TSTupleType:exit"?: (node: TSTupleType) => void;
|
|
1206
|
-
TSTypeAliasDeclaration?: (node: TSTypeAliasDeclaration) => void;
|
|
1207
|
-
"TSTypeAliasDeclaration:exit"?: (node: TSTypeAliasDeclaration) => void;
|
|
1208
|
-
TSTypeAnnotation?: (node: TSTypeAnnotation) => void;
|
|
1209
|
-
"TSTypeAnnotation:exit"?: (node: TSTypeAnnotation) => void;
|
|
1210
|
-
TSTypeAssertion?: (node: TSTypeAssertion) => void;
|
|
1211
|
-
"TSTypeAssertion:exit"?: (node: TSTypeAssertion) => void;
|
|
1212
|
-
TSTypeLiteral?: (node: TSTypeLiteral) => void;
|
|
1213
|
-
"TSTypeLiteral:exit"?: (node: TSTypeLiteral) => void;
|
|
1214
|
-
TSTypeOperator?: (node: TSTypeOperator) => void;
|
|
1215
|
-
"TSTypeOperator:exit"?: (node: TSTypeOperator) => void;
|
|
1216
|
-
TSTypeParameter?: (node: TSTypeParameter) => void;
|
|
1217
|
-
"TSTypeParameter:exit"?: (node: TSTypeParameter) => void;
|
|
1218
|
-
TSTypeParameterDeclaration?: (node: TSTypeParameterDeclaration) => void;
|
|
1219
|
-
"TSTypeParameterDeclaration:exit"?: (node: TSTypeParameterDeclaration) => void;
|
|
1220
|
-
TSTypeParameterInstantiation?: (node: TSTypeParameterInstantiation) => void;
|
|
1221
|
-
"TSTypeParameterInstantiation:exit"?: (node: TSTypeParameterInstantiation) => void;
|
|
1222
|
-
TSTypePredicate?: (node: TSTypePredicate) => void;
|
|
1223
|
-
"TSTypePredicate:exit"?: (node: TSTypePredicate) => void;
|
|
1224
|
-
TSTypeQuery?: (node: TSTypeQuery) => void;
|
|
1225
|
-
"TSTypeQuery:exit"?: (node: TSTypeQuery) => void;
|
|
1226
|
-
TSTypeReference?: (node: TSTypeReference) => void;
|
|
1227
|
-
"TSTypeReference:exit"?: (node: TSTypeReference) => void;
|
|
1228
|
-
TSUnionType?: (node: TSUnionType) => void;
|
|
1229
|
-
"TSUnionType:exit"?: (node: TSUnionType) => void;
|
|
1230
|
-
}
|
|
1231
|
-
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined; } & Record<string, BivarianceHackHandler<(node: Node) => void> | undefined>;
|
|
1232
|
-
//#endregion
|
|
1233
|
-
//#region src-js/plugins/types.d.ts
|
|
1234
|
-
type BeforeHook = () => boolean | void;
|
|
1235
|
-
type AfterHook = () => void;
|
|
1236
|
-
type VisitorWithHooks = VisitorObject & {
|
|
1237
|
-
before?: BeforeHook;
|
|
1238
|
-
after?: AfterHook;
|
|
1239
|
-
};
|
|
1240
|
-
interface Node$1 extends Span {}
|
|
1241
|
-
type NodeOrToken = Node$1 | TokenType | CommentType;
|
|
1242
|
-
//#endregion
|
|
1243
|
-
//#region src-js/plugins/location.d.ts
|
|
1244
|
-
/**
|
|
1245
|
-
* Range of source offsets.
|
|
1246
|
-
*/
|
|
1247
|
-
type Range = [number, number];
|
|
1248
|
-
/**
|
|
1249
|
-
* Interface for any type which has `range` field.
|
|
1250
|
-
*/
|
|
1251
|
-
interface Ranged {
|
|
1252
|
-
range: Range;
|
|
1253
|
-
}
|
|
1254
|
-
/**
|
|
1255
|
-
* Interface for any type which has location properties.
|
|
1256
|
-
*/
|
|
1257
|
-
interface Span extends Ranged {
|
|
1258
|
-
start: number;
|
|
1259
|
-
end: number;
|
|
1260
|
-
loc: Location;
|
|
1261
|
-
}
|
|
1262
|
-
/**
|
|
1263
|
-
* Source code location.
|
|
1264
|
-
*/
|
|
1265
|
-
interface Location {
|
|
1266
|
-
start: LineColumn;
|
|
1267
|
-
end: LineColumn;
|
|
1268
|
-
}
|
|
1269
|
-
/**
|
|
1270
|
-
* Line number + column number pair.
|
|
1271
|
-
* `line` is 1-indexed, `column` is 0-indexed.
|
|
1272
|
-
*/
|
|
1273
|
-
interface LineColumn {
|
|
1274
|
-
line: number;
|
|
1275
|
-
column: number;
|
|
1276
|
-
}
|
|
1277
|
-
/**
|
|
1278
|
-
* Convert a source text index into a (line, column) pair.
|
|
1279
|
-
* @param offset - The index of a character in a file.
|
|
1280
|
-
* @returns `{line, column}` location object with 1-indexed line and 0-indexed column.
|
|
1281
|
-
* @throws {TypeError|RangeError} If non-numeric `offset`, or `offset` out of range.
|
|
1282
|
-
*/
|
|
1283
|
-
declare function getLineColumnFromOffset(offset: number): LineColumn;
|
|
1284
|
-
/**
|
|
1285
|
-
* Convert a `{ line, column }` pair into a range index.
|
|
1286
|
-
* @param loc - A line/column location.
|
|
1287
|
-
* @returns The character index of the location in the file.
|
|
1288
|
-
* @throws {TypeError|RangeError} If `loc` is not an object with a numeric `line` and `column`,
|
|
1289
|
-
* or if the `line` is less than or equal to zero, or the line or column is out of the expected range.
|
|
1290
|
-
*/
|
|
1291
|
-
declare function getOffsetFromLineColumn(loc: LineColumn): number;
|
|
1292
|
-
/**
|
|
1293
|
-
* Get the range of the given node or token.
|
|
1294
|
-
* @param nodeOrToken - Node or token to get the range of
|
|
1295
|
-
* @returns Range of the node or token
|
|
1296
|
-
*/
|
|
1297
|
-
declare function getRange(nodeOrToken: NodeOrToken): Range;
|
|
1298
|
-
/**
|
|
1299
|
-
* Get the location of the given node or token.
|
|
1300
|
-
* @param nodeOrToken - Node or token to get the location of
|
|
1301
|
-
* @returns Location of the node or token
|
|
1302
|
-
*/
|
|
1303
|
-
declare function getLoc(nodeOrToken: NodeOrToken): Location;
|
|
1304
|
-
/**
|
|
1305
|
-
* Get the deepest node containing a range index.
|
|
1306
|
-
* @param offset - Range index of the desired node
|
|
1307
|
-
* @returns The node if found, or `null` if not found
|
|
1308
|
-
*/
|
|
1309
|
-
declare function getNodeByRangeIndex(offset: number): Node | null;
|
|
1310
|
-
//#endregion
|
|
1311
1135
|
//#region src-js/plugins/comments.d.ts
|
|
1312
1136
|
/**
|
|
1313
1137
|
* Comment.
|
|
@@ -1316,8 +1140,9 @@ interface CommentType extends Span {
|
|
|
1316
1140
|
type: "Line" | "Block" | "Shebang";
|
|
1317
1141
|
value: string;
|
|
1318
1142
|
}
|
|
1319
|
-
|
|
1320
|
-
|
|
1143
|
+
declare namespace types_d_exports {
|
|
1144
|
+
export { AccessorProperty, AccessorPropertyType, Argument, ArrayAssignmentTarget, ArrayExpression, ArrayExpressionElement, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentOperator, AssignmentPattern, AssignmentTarget, AssignmentTargetMaybeDefault, AssignmentTargetPattern, AssignmentTargetProperty, AssignmentTargetPropertyIdentifier, AssignmentTargetPropertyProperty, AssignmentTargetRest, AssignmentTargetWithDefault, AwaitExpression, BigIntLiteral, BinaryExpression, BinaryOperator, BindingIdentifier, BindingPattern, BindingProperty, BindingRestElement, BlockStatement, BooleanLiteral, BreakStatement, CallExpression, CatchClause, ChainElement, ChainExpression, Class, ClassBody, ClassElement, ClassType, CommentType as Comment, ComputedMemberExpression, ConditionalExpression, ContinueStatement, DebuggerStatement, Declaration, Decorator, Directive$1 as Directive, DoWhileStatement, EmptyStatement, ExportAllDeclaration, ExportDefaultDeclaration, ExportDefaultDeclarationKind, ExportNamedDeclaration, ExportSpecifier, Expression, ExpressionStatement, ForInStatement, ForOfStatement, ForStatement, ForStatementInit, ForStatementLeft, FormalParameter, FormalParameterRest, Function$1 as Function, FunctionBody, FunctionType, Hashbang, IdentifierName, IdentifierReference, IfStatement, ImportAttribute, ImportAttributeKey, ImportDeclaration, ImportDeclarationSpecifier, ImportDefaultSpecifier, ImportExpression, ImportNamespaceSpecifier, ImportOrExportKind, ImportPhase, ImportSpecifier, JSDocNonNullableType, JSDocNullableType, JSDocUnknownType, JSXAttribute, JSXAttributeItem, JSXAttributeName, JSXAttributeValue, JSXChild, JSXClosingElement, JSXClosingFragment, JSXElement, JSXElementName, JSXEmptyExpression, JSXExpression, JSXExpressionContainer, JSXFragment, JSXIdentifier, JSXMemberExpression, JSXMemberExpressionObject, JSXNamespacedName, JSXOpeningElement, JSXOpeningFragment, JSXSpreadAttribute, JSXSpreadChild, JSXText, LabelIdentifier, LabeledStatement, LogicalExpression, LogicalOperator, MemberExpression, MetaProperty, MethodDefinition, MethodDefinitionKind, MethodDefinitionType, ModuleDeclaration, ModuleExportName, ModuleKind, NewExpression, Node$1 as Node, NullLiteral, NumericLiteral, ObjectAssignmentTarget, ObjectExpression, ObjectPattern, ObjectProperty, ObjectPropertyKind, ParamPattern, ParenthesizedExpression, PrivateFieldExpression, PrivateIdentifier, PrivateInExpression, Program, PropertyDefinition, PropertyDefinitionType, PropertyKey$1 as PropertyKey, PropertyKind, RegExpLiteral, ReturnStatement, SequenceExpression, SimpleAssignmentTarget, Span, SpreadElement, Statement, StaticBlock, StaticMemberExpression, StringLiteral, Super, SwitchCase, SwitchStatement, TSAccessibility, TSAnyKeyword, TSArrayType, TSAsExpression, TSBigIntKeyword, TSBooleanKeyword, TSCallSignatureDeclaration, TSClassImplements, TSConditionalType, TSConstructSignatureDeclaration, TSConstructorType, TSEnumBody, TSEnumDeclaration, TSEnumMember, TSEnumMemberName, TSExportAssignment, TSExternalModuleReference, TSFunctionType, TSGlobalDeclaration, TSImportEqualsDeclaration, TSImportType, TSImportTypeQualifiedName, TSImportTypeQualifier, TSIndexSignature, TSIndexSignatureName, TSIndexedAccessType, TSInferType, TSInstantiationExpression, TSInterfaceBody, TSInterfaceDeclaration, TSInterfaceHeritage, TSIntersectionType, TSIntrinsicKeyword, TSLiteral, TSLiteralType, TSMappedType, TSMappedTypeModifierOperator, TSMethodSignature, TSMethodSignatureKind, TSModuleBlock, TSModuleDeclaration, TSModuleDeclarationKind, TSModuleReference, TSNamedTupleMember, TSNamespaceExportDeclaration, TSNeverKeyword, TSNonNullExpression, TSNullKeyword, TSNumberKeyword, TSObjectKeyword, TSOptionalType, TSParameterProperty, TSParenthesizedType, TSPropertySignature, TSQualifiedName, TSRestType, TSSatisfiesExpression, TSSignature, TSStringKeyword, TSSymbolKeyword, TSTemplateLiteralType, TSThisParameter, TSThisType, TSTupleElement, TSTupleType, TSType, TSTypeAliasDeclaration, TSTypeAnnotation, TSTypeAssertion, TSTypeLiteral, TSTypeName, TSTypeOperator, TSTypeOperatorOperator, TSTypeParameter, TSTypeParameterDeclaration, TSTypeParameterInstantiation, TSTypePredicate, TSTypePredicateName, TSTypeQuery, TSTypeQueryExprName, TSTypeReference, TSUndefinedKeyword, TSUnionType, TSUnknownKeyword, TSVoidKeyword, TaggedTemplateExpression, TemplateElement, TemplateElementValue, TemplateLiteral, ThisExpression, ThrowStatement, TokenType as Token, TryStatement, UnaryExpression, UnaryOperator, UpdateExpression, UpdateOperator, V8IntrinsicExpression, VariableDeclaration, VariableDeclarationKind, VariableDeclarator, WhileStatement, WithStatement, YieldExpression };
|
|
1145
|
+
}
|
|
1321
1146
|
interface Program extends Span {
|
|
1322
1147
|
type: "Program";
|
|
1323
1148
|
body: Array<Directive$1 | Statement>;
|
|
@@ -1333,7 +1158,7 @@ interface IdentifierName extends Span {
|
|
|
1333
1158
|
name: string;
|
|
1334
1159
|
optional?: false;
|
|
1335
1160
|
typeAnnotation?: null;
|
|
1336
|
-
parent: Node;
|
|
1161
|
+
parent: Node$1;
|
|
1337
1162
|
}
|
|
1338
1163
|
interface IdentifierReference extends Span {
|
|
1339
1164
|
type: "Identifier";
|
|
@@ -1341,7 +1166,7 @@ interface IdentifierReference extends Span {
|
|
|
1341
1166
|
name: string;
|
|
1342
1167
|
optional?: false;
|
|
1343
1168
|
typeAnnotation?: null;
|
|
1344
|
-
parent: Node;
|
|
1169
|
+
parent: Node$1;
|
|
1345
1170
|
}
|
|
1346
1171
|
interface BindingIdentifier extends Span {
|
|
1347
1172
|
type: "Identifier";
|
|
@@ -1349,7 +1174,7 @@ interface BindingIdentifier extends Span {
|
|
|
1349
1174
|
name: string;
|
|
1350
1175
|
optional?: false;
|
|
1351
1176
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
1352
|
-
parent: Node;
|
|
1177
|
+
parent: Node$1;
|
|
1353
1178
|
}
|
|
1354
1179
|
interface LabelIdentifier extends Span {
|
|
1355
1180
|
type: "Identifier";
|
|
@@ -1357,22 +1182,22 @@ interface LabelIdentifier extends Span {
|
|
|
1357
1182
|
name: string;
|
|
1358
1183
|
optional?: false;
|
|
1359
1184
|
typeAnnotation?: null;
|
|
1360
|
-
parent: Node;
|
|
1185
|
+
parent: Node$1;
|
|
1361
1186
|
}
|
|
1362
1187
|
interface ThisExpression extends Span {
|
|
1363
1188
|
type: "ThisExpression";
|
|
1364
|
-
parent: Node;
|
|
1189
|
+
parent: Node$1;
|
|
1365
1190
|
}
|
|
1366
1191
|
interface ArrayExpression extends Span {
|
|
1367
1192
|
type: "ArrayExpression";
|
|
1368
1193
|
elements: Array<ArrayExpressionElement>;
|
|
1369
|
-
parent: Node;
|
|
1194
|
+
parent: Node$1;
|
|
1370
1195
|
}
|
|
1371
1196
|
type ArrayExpressionElement = SpreadElement | null | Expression;
|
|
1372
1197
|
interface ObjectExpression extends Span {
|
|
1373
1198
|
type: "ObjectExpression";
|
|
1374
1199
|
properties: Array<ObjectPropertyKind>;
|
|
1375
|
-
parent: Node;
|
|
1200
|
+
parent: Node$1;
|
|
1376
1201
|
}
|
|
1377
1202
|
type ObjectPropertyKind = ObjectProperty | SpreadElement;
|
|
1378
1203
|
interface ObjectProperty extends Span {
|
|
@@ -1384,7 +1209,7 @@ interface ObjectProperty extends Span {
|
|
|
1384
1209
|
shorthand: boolean;
|
|
1385
1210
|
computed: boolean;
|
|
1386
1211
|
optional?: false;
|
|
1387
|
-
parent: Node;
|
|
1212
|
+
parent: Node$1;
|
|
1388
1213
|
}
|
|
1389
1214
|
type PropertyKey$1 = IdentifierName | PrivateIdentifier | Expression;
|
|
1390
1215
|
type PropertyKind = "init" | "get" | "set";
|
|
@@ -1392,20 +1217,20 @@ interface TemplateLiteral extends Span {
|
|
|
1392
1217
|
type: "TemplateLiteral";
|
|
1393
1218
|
quasis: Array<TemplateElement>;
|
|
1394
1219
|
expressions: Array<Expression>;
|
|
1395
|
-
parent: Node;
|
|
1220
|
+
parent: Node$1;
|
|
1396
1221
|
}
|
|
1397
1222
|
interface TaggedTemplateExpression extends Span {
|
|
1398
1223
|
type: "TaggedTemplateExpression";
|
|
1399
1224
|
tag: Expression;
|
|
1400
1225
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1401
1226
|
quasi: TemplateLiteral;
|
|
1402
|
-
parent: Node;
|
|
1227
|
+
parent: Node$1;
|
|
1403
1228
|
}
|
|
1404
1229
|
interface TemplateElement extends Span {
|
|
1405
1230
|
type: "TemplateElement";
|
|
1406
1231
|
value: TemplateElementValue;
|
|
1407
1232
|
tail: boolean;
|
|
1408
|
-
parent: Node;
|
|
1233
|
+
parent: Node$1;
|
|
1409
1234
|
}
|
|
1410
1235
|
interface TemplateElementValue {
|
|
1411
1236
|
raw: string;
|
|
@@ -1418,7 +1243,7 @@ interface ComputedMemberExpression extends Span {
|
|
|
1418
1243
|
property: Expression;
|
|
1419
1244
|
optional: boolean;
|
|
1420
1245
|
computed: true;
|
|
1421
|
-
parent: Node;
|
|
1246
|
+
parent: Node$1;
|
|
1422
1247
|
}
|
|
1423
1248
|
interface StaticMemberExpression extends Span {
|
|
1424
1249
|
type: "MemberExpression";
|
|
@@ -1426,7 +1251,7 @@ interface StaticMemberExpression extends Span {
|
|
|
1426
1251
|
property: IdentifierName;
|
|
1427
1252
|
optional: boolean;
|
|
1428
1253
|
computed: false;
|
|
1429
|
-
parent: Node;
|
|
1254
|
+
parent: Node$1;
|
|
1430
1255
|
}
|
|
1431
1256
|
interface PrivateFieldExpression extends Span {
|
|
1432
1257
|
type: "MemberExpression";
|
|
@@ -1434,7 +1259,7 @@ interface PrivateFieldExpression extends Span {
|
|
|
1434
1259
|
property: PrivateIdentifier;
|
|
1435
1260
|
optional: boolean;
|
|
1436
1261
|
computed: false;
|
|
1437
|
-
parent: Node;
|
|
1262
|
+
parent: Node$1;
|
|
1438
1263
|
}
|
|
1439
1264
|
interface CallExpression extends Span {
|
|
1440
1265
|
type: "CallExpression";
|
|
@@ -1442,25 +1267,25 @@ interface CallExpression extends Span {
|
|
|
1442
1267
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1443
1268
|
arguments: Array<Argument>;
|
|
1444
1269
|
optional: boolean;
|
|
1445
|
-
parent: Node;
|
|
1270
|
+
parent: Node$1;
|
|
1446
1271
|
}
|
|
1447
1272
|
interface NewExpression extends Span {
|
|
1448
1273
|
type: "NewExpression";
|
|
1449
1274
|
callee: Expression;
|
|
1450
1275
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1451
1276
|
arguments: Array<Argument>;
|
|
1452
|
-
parent: Node;
|
|
1277
|
+
parent: Node$1;
|
|
1453
1278
|
}
|
|
1454
1279
|
interface MetaProperty extends Span {
|
|
1455
1280
|
type: "MetaProperty";
|
|
1456
1281
|
meta: IdentifierName;
|
|
1457
1282
|
property: IdentifierName;
|
|
1458
|
-
parent: Node;
|
|
1283
|
+
parent: Node$1;
|
|
1459
1284
|
}
|
|
1460
1285
|
interface SpreadElement extends Span {
|
|
1461
1286
|
type: "SpreadElement";
|
|
1462
1287
|
argument: Expression;
|
|
1463
|
-
parent: Node;
|
|
1288
|
+
parent: Node$1;
|
|
1464
1289
|
}
|
|
1465
1290
|
type Argument = SpreadElement | Expression;
|
|
1466
1291
|
interface UpdateExpression extends Span {
|
|
@@ -1468,49 +1293,49 @@ interface UpdateExpression extends Span {
|
|
|
1468
1293
|
operator: UpdateOperator;
|
|
1469
1294
|
prefix: boolean;
|
|
1470
1295
|
argument: SimpleAssignmentTarget;
|
|
1471
|
-
parent: Node;
|
|
1296
|
+
parent: Node$1;
|
|
1472
1297
|
}
|
|
1473
1298
|
interface UnaryExpression extends Span {
|
|
1474
1299
|
type: "UnaryExpression";
|
|
1475
1300
|
operator: UnaryOperator;
|
|
1476
1301
|
argument: Expression;
|
|
1477
1302
|
prefix: true;
|
|
1478
|
-
parent: Node;
|
|
1303
|
+
parent: Node$1;
|
|
1479
1304
|
}
|
|
1480
1305
|
interface BinaryExpression extends Span {
|
|
1481
1306
|
type: "BinaryExpression";
|
|
1482
1307
|
left: Expression;
|
|
1483
1308
|
operator: BinaryOperator;
|
|
1484
1309
|
right: Expression;
|
|
1485
|
-
parent: Node;
|
|
1310
|
+
parent: Node$1;
|
|
1486
1311
|
}
|
|
1487
1312
|
interface PrivateInExpression extends Span {
|
|
1488
1313
|
type: "BinaryExpression";
|
|
1489
1314
|
left: PrivateIdentifier;
|
|
1490
1315
|
operator: "in";
|
|
1491
1316
|
right: Expression;
|
|
1492
|
-
parent: Node;
|
|
1317
|
+
parent: Node$1;
|
|
1493
1318
|
}
|
|
1494
1319
|
interface LogicalExpression extends Span {
|
|
1495
1320
|
type: "LogicalExpression";
|
|
1496
1321
|
left: Expression;
|
|
1497
1322
|
operator: LogicalOperator;
|
|
1498
1323
|
right: Expression;
|
|
1499
|
-
parent: Node;
|
|
1324
|
+
parent: Node$1;
|
|
1500
1325
|
}
|
|
1501
1326
|
interface ConditionalExpression extends Span {
|
|
1502
1327
|
type: "ConditionalExpression";
|
|
1503
1328
|
test: Expression;
|
|
1504
1329
|
consequent: Expression;
|
|
1505
1330
|
alternate: Expression;
|
|
1506
|
-
parent: Node;
|
|
1331
|
+
parent: Node$1;
|
|
1507
1332
|
}
|
|
1508
1333
|
interface AssignmentExpression extends Span {
|
|
1509
1334
|
type: "AssignmentExpression";
|
|
1510
1335
|
operator: AssignmentOperator;
|
|
1511
1336
|
left: AssignmentTarget;
|
|
1512
1337
|
right: Expression;
|
|
1513
|
-
parent: Node;
|
|
1338
|
+
parent: Node$1;
|
|
1514
1339
|
}
|
|
1515
1340
|
type AssignmentTarget = SimpleAssignmentTarget | AssignmentTargetPattern;
|
|
1516
1341
|
type SimpleAssignmentTarget = IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | MemberExpression;
|
|
@@ -1521,7 +1346,7 @@ interface ArrayAssignmentTarget extends Span {
|
|
|
1521
1346
|
elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
|
|
1522
1347
|
optional?: false;
|
|
1523
1348
|
typeAnnotation?: null;
|
|
1524
|
-
parent: Node;
|
|
1349
|
+
parent: Node$1;
|
|
1525
1350
|
}
|
|
1526
1351
|
interface ObjectAssignmentTarget extends Span {
|
|
1527
1352
|
type: "ObjectPattern";
|
|
@@ -1529,7 +1354,7 @@ interface ObjectAssignmentTarget extends Span {
|
|
|
1529
1354
|
properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
|
|
1530
1355
|
optional?: false;
|
|
1531
1356
|
typeAnnotation?: null;
|
|
1532
|
-
parent: Node;
|
|
1357
|
+
parent: Node$1;
|
|
1533
1358
|
}
|
|
1534
1359
|
interface AssignmentTargetRest extends Span {
|
|
1535
1360
|
type: "RestElement";
|
|
@@ -1538,7 +1363,7 @@ interface AssignmentTargetRest extends Span {
|
|
|
1538
1363
|
optional?: false;
|
|
1539
1364
|
typeAnnotation?: null;
|
|
1540
1365
|
value?: null;
|
|
1541
|
-
parent: Node;
|
|
1366
|
+
parent: Node$1;
|
|
1542
1367
|
}
|
|
1543
1368
|
type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
|
|
1544
1369
|
interface AssignmentTargetWithDefault extends Span {
|
|
@@ -1548,7 +1373,7 @@ interface AssignmentTargetWithDefault extends Span {
|
|
|
1548
1373
|
right: Expression;
|
|
1549
1374
|
optional?: false;
|
|
1550
1375
|
typeAnnotation?: null;
|
|
1551
|
-
parent: Node;
|
|
1376
|
+
parent: Node$1;
|
|
1552
1377
|
}
|
|
1553
1378
|
type AssignmentTargetProperty = AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty;
|
|
1554
1379
|
interface AssignmentTargetPropertyIdentifier extends Span {
|
|
@@ -1560,7 +1385,7 @@ interface AssignmentTargetPropertyIdentifier extends Span {
|
|
|
1560
1385
|
shorthand: true;
|
|
1561
1386
|
computed: false;
|
|
1562
1387
|
optional?: false;
|
|
1563
|
-
parent: Node;
|
|
1388
|
+
parent: Node$1;
|
|
1564
1389
|
}
|
|
1565
1390
|
interface AssignmentTargetPropertyProperty extends Span {
|
|
1566
1391
|
type: "Property";
|
|
@@ -1571,49 +1396,49 @@ interface AssignmentTargetPropertyProperty extends Span {
|
|
|
1571
1396
|
shorthand: false;
|
|
1572
1397
|
computed: boolean;
|
|
1573
1398
|
optional?: false;
|
|
1574
|
-
parent: Node;
|
|
1399
|
+
parent: Node$1;
|
|
1575
1400
|
}
|
|
1576
1401
|
interface SequenceExpression extends Span {
|
|
1577
1402
|
type: "SequenceExpression";
|
|
1578
1403
|
expressions: Array<Expression>;
|
|
1579
|
-
parent: Node;
|
|
1404
|
+
parent: Node$1;
|
|
1580
1405
|
}
|
|
1581
1406
|
interface Super extends Span {
|
|
1582
1407
|
type: "Super";
|
|
1583
|
-
parent: Node;
|
|
1408
|
+
parent: Node$1;
|
|
1584
1409
|
}
|
|
1585
1410
|
interface AwaitExpression extends Span {
|
|
1586
1411
|
type: "AwaitExpression";
|
|
1587
1412
|
argument: Expression;
|
|
1588
|
-
parent: Node;
|
|
1413
|
+
parent: Node$1;
|
|
1589
1414
|
}
|
|
1590
1415
|
interface ChainExpression extends Span {
|
|
1591
1416
|
type: "ChainExpression";
|
|
1592
1417
|
expression: ChainElement;
|
|
1593
|
-
parent: Node;
|
|
1418
|
+
parent: Node$1;
|
|
1594
1419
|
}
|
|
1595
1420
|
type ChainElement = CallExpression | TSNonNullExpression | MemberExpression;
|
|
1596
1421
|
interface ParenthesizedExpression extends Span {
|
|
1597
1422
|
type: "ParenthesizedExpression";
|
|
1598
1423
|
expression: Expression;
|
|
1599
|
-
parent: Node;
|
|
1424
|
+
parent: Node$1;
|
|
1600
1425
|
}
|
|
1601
1426
|
type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | WithStatement | Declaration | ModuleDeclaration;
|
|
1602
1427
|
interface Directive$1 extends Span {
|
|
1603
1428
|
type: "ExpressionStatement";
|
|
1604
1429
|
expression: StringLiteral;
|
|
1605
1430
|
directive: string;
|
|
1606
|
-
parent: Node;
|
|
1431
|
+
parent: Node$1;
|
|
1607
1432
|
}
|
|
1608
1433
|
interface Hashbang extends Span {
|
|
1609
1434
|
type: "Hashbang";
|
|
1610
1435
|
value: string;
|
|
1611
|
-
parent: Node;
|
|
1436
|
+
parent: Node$1;
|
|
1612
1437
|
}
|
|
1613
1438
|
interface BlockStatement extends Span {
|
|
1614
1439
|
type: "BlockStatement";
|
|
1615
1440
|
body: Array<Statement>;
|
|
1616
|
-
parent: Node;
|
|
1441
|
+
parent: Node$1;
|
|
1617
1442
|
}
|
|
1618
1443
|
type Declaration = VariableDeclaration | Function$1 | Class | TSTypeAliasDeclaration | TSInterfaceDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSGlobalDeclaration | TSImportEqualsDeclaration;
|
|
1619
1444
|
interface VariableDeclaration extends Span {
|
|
@@ -1621,7 +1446,7 @@ interface VariableDeclaration extends Span {
|
|
|
1621
1446
|
kind: VariableDeclarationKind;
|
|
1622
1447
|
declarations: Array<VariableDeclarator>;
|
|
1623
1448
|
declare?: boolean;
|
|
1624
|
-
parent: Node;
|
|
1449
|
+
parent: Node$1;
|
|
1625
1450
|
}
|
|
1626
1451
|
type VariableDeclarationKind = "var" | "let" | "const" | "using" | "await using";
|
|
1627
1452
|
interface VariableDeclarator extends Span {
|
|
@@ -1629,36 +1454,36 @@ interface VariableDeclarator extends Span {
|
|
|
1629
1454
|
id: BindingPattern;
|
|
1630
1455
|
init: Expression | null;
|
|
1631
1456
|
definite?: boolean;
|
|
1632
|
-
parent: Node;
|
|
1457
|
+
parent: Node$1;
|
|
1633
1458
|
}
|
|
1634
1459
|
interface EmptyStatement extends Span {
|
|
1635
1460
|
type: "EmptyStatement";
|
|
1636
|
-
parent: Node;
|
|
1461
|
+
parent: Node$1;
|
|
1637
1462
|
}
|
|
1638
1463
|
interface ExpressionStatement extends Span {
|
|
1639
1464
|
type: "ExpressionStatement";
|
|
1640
1465
|
expression: Expression;
|
|
1641
1466
|
directive?: string | null;
|
|
1642
|
-
parent: Node;
|
|
1467
|
+
parent: Node$1;
|
|
1643
1468
|
}
|
|
1644
1469
|
interface IfStatement extends Span {
|
|
1645
1470
|
type: "IfStatement";
|
|
1646
1471
|
test: Expression;
|
|
1647
1472
|
consequent: Statement;
|
|
1648
1473
|
alternate: Statement | null;
|
|
1649
|
-
parent: Node;
|
|
1474
|
+
parent: Node$1;
|
|
1650
1475
|
}
|
|
1651
1476
|
interface DoWhileStatement extends Span {
|
|
1652
1477
|
type: "DoWhileStatement";
|
|
1653
1478
|
body: Statement;
|
|
1654
1479
|
test: Expression;
|
|
1655
|
-
parent: Node;
|
|
1480
|
+
parent: Node$1;
|
|
1656
1481
|
}
|
|
1657
1482
|
interface WhileStatement extends Span {
|
|
1658
1483
|
type: "WhileStatement";
|
|
1659
1484
|
test: Expression;
|
|
1660
1485
|
body: Statement;
|
|
1661
|
-
parent: Node;
|
|
1486
|
+
parent: Node$1;
|
|
1662
1487
|
}
|
|
1663
1488
|
interface ForStatement extends Span {
|
|
1664
1489
|
type: "ForStatement";
|
|
@@ -1666,7 +1491,7 @@ interface ForStatement extends Span {
|
|
|
1666
1491
|
test: Expression | null;
|
|
1667
1492
|
update: Expression | null;
|
|
1668
1493
|
body: Statement;
|
|
1669
|
-
parent: Node;
|
|
1494
|
+
parent: Node$1;
|
|
1670
1495
|
}
|
|
1671
1496
|
type ForStatementInit = VariableDeclaration | Expression;
|
|
1672
1497
|
interface ForInStatement extends Span {
|
|
@@ -1674,7 +1499,7 @@ interface ForInStatement extends Span {
|
|
|
1674
1499
|
left: ForStatementLeft;
|
|
1675
1500
|
right: Expression;
|
|
1676
1501
|
body: Statement;
|
|
1677
|
-
parent: Node;
|
|
1502
|
+
parent: Node$1;
|
|
1678
1503
|
}
|
|
1679
1504
|
type ForStatementLeft = VariableDeclaration | AssignmentTarget;
|
|
1680
1505
|
interface ForOfStatement extends Span {
|
|
@@ -1683,68 +1508,68 @@ interface ForOfStatement extends Span {
|
|
|
1683
1508
|
left: ForStatementLeft;
|
|
1684
1509
|
right: Expression;
|
|
1685
1510
|
body: Statement;
|
|
1686
|
-
parent: Node;
|
|
1511
|
+
parent: Node$1;
|
|
1687
1512
|
}
|
|
1688
1513
|
interface ContinueStatement extends Span {
|
|
1689
1514
|
type: "ContinueStatement";
|
|
1690
1515
|
label: LabelIdentifier | null;
|
|
1691
|
-
parent: Node;
|
|
1516
|
+
parent: Node$1;
|
|
1692
1517
|
}
|
|
1693
1518
|
interface BreakStatement extends Span {
|
|
1694
1519
|
type: "BreakStatement";
|
|
1695
1520
|
label: LabelIdentifier | null;
|
|
1696
|
-
parent: Node;
|
|
1521
|
+
parent: Node$1;
|
|
1697
1522
|
}
|
|
1698
1523
|
interface ReturnStatement extends Span {
|
|
1699
1524
|
type: "ReturnStatement";
|
|
1700
1525
|
argument: Expression | null;
|
|
1701
|
-
parent: Node;
|
|
1526
|
+
parent: Node$1;
|
|
1702
1527
|
}
|
|
1703
1528
|
interface WithStatement extends Span {
|
|
1704
1529
|
type: "WithStatement";
|
|
1705
1530
|
object: Expression;
|
|
1706
1531
|
body: Statement;
|
|
1707
|
-
parent: Node;
|
|
1532
|
+
parent: Node$1;
|
|
1708
1533
|
}
|
|
1709
1534
|
interface SwitchStatement extends Span {
|
|
1710
1535
|
type: "SwitchStatement";
|
|
1711
1536
|
discriminant: Expression;
|
|
1712
1537
|
cases: Array<SwitchCase>;
|
|
1713
|
-
parent: Node;
|
|
1538
|
+
parent: Node$1;
|
|
1714
1539
|
}
|
|
1715
1540
|
interface SwitchCase extends Span {
|
|
1716
1541
|
type: "SwitchCase";
|
|
1717
1542
|
test: Expression | null;
|
|
1718
1543
|
consequent: Array<Statement>;
|
|
1719
|
-
parent: Node;
|
|
1544
|
+
parent: Node$1;
|
|
1720
1545
|
}
|
|
1721
1546
|
interface LabeledStatement extends Span {
|
|
1722
1547
|
type: "LabeledStatement";
|
|
1723
1548
|
label: LabelIdentifier;
|
|
1724
1549
|
body: Statement;
|
|
1725
|
-
parent: Node;
|
|
1550
|
+
parent: Node$1;
|
|
1726
1551
|
}
|
|
1727
1552
|
interface ThrowStatement extends Span {
|
|
1728
1553
|
type: "ThrowStatement";
|
|
1729
1554
|
argument: Expression;
|
|
1730
|
-
parent: Node;
|
|
1555
|
+
parent: Node$1;
|
|
1731
1556
|
}
|
|
1732
1557
|
interface TryStatement extends Span {
|
|
1733
1558
|
type: "TryStatement";
|
|
1734
1559
|
block: BlockStatement;
|
|
1735
1560
|
handler: CatchClause | null;
|
|
1736
1561
|
finalizer: BlockStatement | null;
|
|
1737
|
-
parent: Node;
|
|
1562
|
+
parent: Node$1;
|
|
1738
1563
|
}
|
|
1739
1564
|
interface CatchClause extends Span {
|
|
1740
1565
|
type: "CatchClause";
|
|
1741
1566
|
param: BindingPattern | null;
|
|
1742
1567
|
body: BlockStatement;
|
|
1743
|
-
parent: Node;
|
|
1568
|
+
parent: Node$1;
|
|
1744
1569
|
}
|
|
1745
1570
|
interface DebuggerStatement extends Span {
|
|
1746
1571
|
type: "DebuggerStatement";
|
|
1747
|
-
parent: Node;
|
|
1572
|
+
parent: Node$1;
|
|
1748
1573
|
}
|
|
1749
1574
|
type BindingPattern = BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern;
|
|
1750
1575
|
interface AssignmentPattern extends Span {
|
|
@@ -1754,7 +1579,7 @@ interface AssignmentPattern extends Span {
|
|
|
1754
1579
|
right: Expression;
|
|
1755
1580
|
optional?: false;
|
|
1756
1581
|
typeAnnotation?: null;
|
|
1757
|
-
parent: Node;
|
|
1582
|
+
parent: Node$1;
|
|
1758
1583
|
}
|
|
1759
1584
|
interface ObjectPattern extends Span {
|
|
1760
1585
|
type: "ObjectPattern";
|
|
@@ -1762,7 +1587,7 @@ interface ObjectPattern extends Span {
|
|
|
1762
1587
|
properties: Array<BindingProperty | BindingRestElement>;
|
|
1763
1588
|
optional?: false;
|
|
1764
1589
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
1765
|
-
parent: Node;
|
|
1590
|
+
parent: Node$1;
|
|
1766
1591
|
}
|
|
1767
1592
|
interface BindingProperty extends Span {
|
|
1768
1593
|
type: "Property";
|
|
@@ -1773,7 +1598,7 @@ interface BindingProperty extends Span {
|
|
|
1773
1598
|
shorthand: boolean;
|
|
1774
1599
|
computed: boolean;
|
|
1775
1600
|
optional?: false;
|
|
1776
|
-
parent: Node;
|
|
1601
|
+
parent: Node$1;
|
|
1777
1602
|
}
|
|
1778
1603
|
interface ArrayPattern extends Span {
|
|
1779
1604
|
type: "ArrayPattern";
|
|
@@ -1781,7 +1606,7 @@ interface ArrayPattern extends Span {
|
|
|
1781
1606
|
elements: Array<BindingPattern | BindingRestElement | null>;
|
|
1782
1607
|
optional?: false;
|
|
1783
1608
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
1784
|
-
parent: Node;
|
|
1609
|
+
parent: Node$1;
|
|
1785
1610
|
}
|
|
1786
1611
|
interface BindingRestElement extends Span {
|
|
1787
1612
|
type: "RestElement";
|
|
@@ -1790,7 +1615,7 @@ interface BindingRestElement extends Span {
|
|
|
1790
1615
|
optional?: false;
|
|
1791
1616
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
1792
1617
|
value?: null;
|
|
1793
|
-
parent: Node;
|
|
1618
|
+
parent: Node$1;
|
|
1794
1619
|
}
|
|
1795
1620
|
interface Function$1 extends Span {
|
|
1796
1621
|
type: FunctionType;
|
|
@@ -1803,7 +1628,7 @@ interface Function$1 extends Span {
|
|
|
1803
1628
|
returnType?: TSTypeAnnotation | null;
|
|
1804
1629
|
body: FunctionBody | null;
|
|
1805
1630
|
expression: false;
|
|
1806
|
-
parent: Node;
|
|
1631
|
+
parent: Node$1;
|
|
1807
1632
|
}
|
|
1808
1633
|
type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest;
|
|
1809
1634
|
type FunctionType = "FunctionDeclaration" | "FunctionExpression" | "TSDeclareFunction" | "TSEmptyBodyFunctionExpression";
|
|
@@ -1814,7 +1639,7 @@ interface FormalParameterRest extends Span {
|
|
|
1814
1639
|
optional?: boolean;
|
|
1815
1640
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
1816
1641
|
value?: null;
|
|
1817
|
-
parent: Node;
|
|
1642
|
+
parent: Node$1;
|
|
1818
1643
|
}
|
|
1819
1644
|
type FormalParameter = {
|
|
1820
1645
|
decorators?: Array<Decorator>;
|
|
@@ -1827,12 +1652,12 @@ interface TSParameterProperty extends Span {
|
|
|
1827
1652
|
parameter: FormalParameter;
|
|
1828
1653
|
readonly: boolean;
|
|
1829
1654
|
static: boolean;
|
|
1830
|
-
parent: Node;
|
|
1655
|
+
parent: Node$1;
|
|
1831
1656
|
}
|
|
1832
1657
|
interface FunctionBody extends Span {
|
|
1833
1658
|
type: "BlockStatement";
|
|
1834
1659
|
body: Array<Directive$1 | Statement>;
|
|
1835
|
-
parent: Node;
|
|
1660
|
+
parent: Node$1;
|
|
1836
1661
|
}
|
|
1837
1662
|
interface ArrowFunctionExpression extends Span {
|
|
1838
1663
|
type: "ArrowFunctionExpression";
|
|
@@ -1844,13 +1669,13 @@ interface ArrowFunctionExpression extends Span {
|
|
|
1844
1669
|
body: FunctionBody | Expression;
|
|
1845
1670
|
id: null;
|
|
1846
1671
|
generator: false;
|
|
1847
|
-
parent: Node;
|
|
1672
|
+
parent: Node$1;
|
|
1848
1673
|
}
|
|
1849
1674
|
interface YieldExpression extends Span {
|
|
1850
1675
|
type: "YieldExpression";
|
|
1851
1676
|
delegate: boolean;
|
|
1852
1677
|
argument: Expression | null;
|
|
1853
|
-
parent: Node;
|
|
1678
|
+
parent: Node$1;
|
|
1854
1679
|
}
|
|
1855
1680
|
interface Class extends Span {
|
|
1856
1681
|
type: ClassType;
|
|
@@ -1863,13 +1688,13 @@ interface Class extends Span {
|
|
|
1863
1688
|
body: ClassBody;
|
|
1864
1689
|
abstract?: boolean;
|
|
1865
1690
|
declare?: boolean;
|
|
1866
|
-
parent: Node;
|
|
1691
|
+
parent: Node$1;
|
|
1867
1692
|
}
|
|
1868
1693
|
type ClassType = "ClassDeclaration" | "ClassExpression";
|
|
1869
1694
|
interface ClassBody extends Span {
|
|
1870
1695
|
type: "ClassBody";
|
|
1871
1696
|
body: Array<ClassElement>;
|
|
1872
|
-
parent: Node;
|
|
1697
|
+
parent: Node$1;
|
|
1873
1698
|
}
|
|
1874
1699
|
type ClassElement = StaticBlock | MethodDefinition | PropertyDefinition | AccessorProperty | TSIndexSignature;
|
|
1875
1700
|
interface MethodDefinition extends Span {
|
|
@@ -1883,7 +1708,7 @@ interface MethodDefinition extends Span {
|
|
|
1883
1708
|
override?: boolean;
|
|
1884
1709
|
optional?: boolean;
|
|
1885
1710
|
accessibility?: TSAccessibility | null;
|
|
1886
|
-
parent: Node;
|
|
1711
|
+
parent: Node$1;
|
|
1887
1712
|
}
|
|
1888
1713
|
type MethodDefinitionType = "MethodDefinition" | "TSAbstractMethodDefinition";
|
|
1889
1714
|
interface PropertyDefinition extends Span {
|
|
@@ -1900,19 +1725,19 @@ interface PropertyDefinition extends Span {
|
|
|
1900
1725
|
definite?: boolean;
|
|
1901
1726
|
readonly?: boolean;
|
|
1902
1727
|
accessibility?: TSAccessibility | null;
|
|
1903
|
-
parent: Node;
|
|
1728
|
+
parent: Node$1;
|
|
1904
1729
|
}
|
|
1905
1730
|
type PropertyDefinitionType = "PropertyDefinition" | "TSAbstractPropertyDefinition";
|
|
1906
1731
|
type MethodDefinitionKind = "constructor" | "method" | "get" | "set";
|
|
1907
1732
|
interface PrivateIdentifier extends Span {
|
|
1908
1733
|
type: "PrivateIdentifier";
|
|
1909
1734
|
name: string;
|
|
1910
|
-
parent: Node;
|
|
1735
|
+
parent: Node$1;
|
|
1911
1736
|
}
|
|
1912
1737
|
interface StaticBlock extends Span {
|
|
1913
1738
|
type: "StaticBlock";
|
|
1914
1739
|
body: Array<Statement>;
|
|
1915
|
-
parent: Node;
|
|
1740
|
+
parent: Node$1;
|
|
1916
1741
|
}
|
|
1917
1742
|
type ModuleDeclaration = ImportDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
|
|
1918
1743
|
type AccessorPropertyType = "AccessorProperty" | "TSAbstractAccessorProperty";
|
|
@@ -1930,14 +1755,14 @@ interface AccessorProperty extends Span {
|
|
|
1930
1755
|
declare?: false;
|
|
1931
1756
|
optional?: false;
|
|
1932
1757
|
readonly?: false;
|
|
1933
|
-
parent: Node;
|
|
1758
|
+
parent: Node$1;
|
|
1934
1759
|
}
|
|
1935
1760
|
interface ImportExpression extends Span {
|
|
1936
1761
|
type: "ImportExpression";
|
|
1937
1762
|
source: Expression;
|
|
1938
1763
|
options: Expression | null;
|
|
1939
1764
|
phase: ImportPhase | null;
|
|
1940
|
-
parent: Node;
|
|
1765
|
+
parent: Node$1;
|
|
1941
1766
|
}
|
|
1942
1767
|
interface ImportDeclaration extends Span {
|
|
1943
1768
|
type: "ImportDeclaration";
|
|
@@ -1946,7 +1771,7 @@ interface ImportDeclaration extends Span {
|
|
|
1946
1771
|
phase: ImportPhase | null;
|
|
1947
1772
|
attributes: Array<ImportAttribute>;
|
|
1948
1773
|
importKind?: ImportOrExportKind;
|
|
1949
|
-
parent: Node;
|
|
1774
|
+
parent: Node$1;
|
|
1950
1775
|
}
|
|
1951
1776
|
type ImportPhase = "source" | "defer";
|
|
1952
1777
|
type ImportDeclarationSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
|
|
@@ -1955,23 +1780,23 @@ interface ImportSpecifier extends Span {
|
|
|
1955
1780
|
imported: ModuleExportName;
|
|
1956
1781
|
local: BindingIdentifier;
|
|
1957
1782
|
importKind?: ImportOrExportKind;
|
|
1958
|
-
parent: Node;
|
|
1783
|
+
parent: Node$1;
|
|
1959
1784
|
}
|
|
1960
1785
|
interface ImportDefaultSpecifier extends Span {
|
|
1961
1786
|
type: "ImportDefaultSpecifier";
|
|
1962
1787
|
local: BindingIdentifier;
|
|
1963
|
-
parent: Node;
|
|
1788
|
+
parent: Node$1;
|
|
1964
1789
|
}
|
|
1965
1790
|
interface ImportNamespaceSpecifier extends Span {
|
|
1966
1791
|
type: "ImportNamespaceSpecifier";
|
|
1967
1792
|
local: BindingIdentifier;
|
|
1968
|
-
parent: Node;
|
|
1793
|
+
parent: Node$1;
|
|
1969
1794
|
}
|
|
1970
1795
|
interface ImportAttribute extends Span {
|
|
1971
1796
|
type: "ImportAttribute";
|
|
1972
1797
|
key: ImportAttributeKey;
|
|
1973
1798
|
value: StringLiteral;
|
|
1974
|
-
parent: Node;
|
|
1799
|
+
parent: Node$1;
|
|
1975
1800
|
}
|
|
1976
1801
|
type ImportAttributeKey = IdentifierName | StringLiteral;
|
|
1977
1802
|
interface ExportNamedDeclaration extends Span {
|
|
@@ -1981,13 +1806,13 @@ interface ExportNamedDeclaration extends Span {
|
|
|
1981
1806
|
source: StringLiteral | null;
|
|
1982
1807
|
exportKind?: ImportOrExportKind;
|
|
1983
1808
|
attributes: Array<ImportAttribute>;
|
|
1984
|
-
parent: Node;
|
|
1809
|
+
parent: Node$1;
|
|
1985
1810
|
}
|
|
1986
1811
|
interface ExportDefaultDeclaration extends Span {
|
|
1987
1812
|
type: "ExportDefaultDeclaration";
|
|
1988
1813
|
declaration: ExportDefaultDeclarationKind;
|
|
1989
1814
|
exportKind?: "value";
|
|
1990
|
-
parent: Node;
|
|
1815
|
+
parent: Node$1;
|
|
1991
1816
|
}
|
|
1992
1817
|
interface ExportAllDeclaration extends Span {
|
|
1993
1818
|
type: "ExportAllDeclaration";
|
|
@@ -1995,14 +1820,14 @@ interface ExportAllDeclaration extends Span {
|
|
|
1995
1820
|
source: StringLiteral;
|
|
1996
1821
|
attributes: Array<ImportAttribute>;
|
|
1997
1822
|
exportKind?: ImportOrExportKind;
|
|
1998
|
-
parent: Node;
|
|
1823
|
+
parent: Node$1;
|
|
1999
1824
|
}
|
|
2000
1825
|
interface ExportSpecifier extends Span {
|
|
2001
1826
|
type: "ExportSpecifier";
|
|
2002
1827
|
local: ModuleExportName;
|
|
2003
1828
|
exported: ModuleExportName;
|
|
2004
1829
|
exportKind?: ImportOrExportKind;
|
|
2005
|
-
parent: Node;
|
|
1830
|
+
parent: Node$1;
|
|
2006
1831
|
}
|
|
2007
1832
|
type ExportDefaultDeclarationKind = Function$1 | Class | TSInterfaceDeclaration | Expression;
|
|
2008
1833
|
type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;
|
|
@@ -2010,38 +1835,38 @@ interface V8IntrinsicExpression extends Span {
|
|
|
2010
1835
|
type: "V8IntrinsicExpression";
|
|
2011
1836
|
name: IdentifierName;
|
|
2012
1837
|
arguments: Array<Argument>;
|
|
2013
|
-
parent: Node;
|
|
1838
|
+
parent: Node$1;
|
|
2014
1839
|
}
|
|
2015
1840
|
interface BooleanLiteral extends Span {
|
|
2016
1841
|
type: "Literal";
|
|
2017
1842
|
value: boolean;
|
|
2018
1843
|
raw: string | null;
|
|
2019
|
-
parent: Node;
|
|
1844
|
+
parent: Node$1;
|
|
2020
1845
|
}
|
|
2021
1846
|
interface NullLiteral extends Span {
|
|
2022
1847
|
type: "Literal";
|
|
2023
1848
|
value: null;
|
|
2024
1849
|
raw: "null" | null;
|
|
2025
|
-
parent: Node;
|
|
1850
|
+
parent: Node$1;
|
|
2026
1851
|
}
|
|
2027
1852
|
interface NumericLiteral extends Span {
|
|
2028
1853
|
type: "Literal";
|
|
2029
1854
|
value: number;
|
|
2030
1855
|
raw: string | null;
|
|
2031
|
-
parent: Node;
|
|
1856
|
+
parent: Node$1;
|
|
2032
1857
|
}
|
|
2033
1858
|
interface StringLiteral extends Span {
|
|
2034
1859
|
type: "Literal";
|
|
2035
1860
|
value: string;
|
|
2036
1861
|
raw: string | null;
|
|
2037
|
-
parent: Node;
|
|
1862
|
+
parent: Node$1;
|
|
2038
1863
|
}
|
|
2039
1864
|
interface BigIntLiteral extends Span {
|
|
2040
1865
|
type: "Literal";
|
|
2041
1866
|
value: bigint;
|
|
2042
1867
|
raw: string | null;
|
|
2043
1868
|
bigint: string;
|
|
2044
|
-
parent: Node;
|
|
1869
|
+
parent: Node$1;
|
|
2045
1870
|
}
|
|
2046
1871
|
interface RegExpLiteral extends Span {
|
|
2047
1872
|
type: "Literal";
|
|
@@ -2051,14 +1876,14 @@ interface RegExpLiteral extends Span {
|
|
|
2051
1876
|
pattern: string;
|
|
2052
1877
|
flags: string;
|
|
2053
1878
|
};
|
|
2054
|
-
parent: Node;
|
|
1879
|
+
parent: Node$1;
|
|
2055
1880
|
}
|
|
2056
1881
|
interface JSXElement extends Span {
|
|
2057
1882
|
type: "JSXElement";
|
|
2058
1883
|
openingElement: JSXOpeningElement;
|
|
2059
1884
|
children: Array<JSXChild>;
|
|
2060
1885
|
closingElement: JSXClosingElement | null;
|
|
2061
|
-
parent: Node;
|
|
1886
|
+
parent: Node$1;
|
|
2062
1887
|
}
|
|
2063
1888
|
interface JSXOpeningElement extends Span {
|
|
2064
1889
|
type: "JSXOpeningElement";
|
|
@@ -2066,84 +1891,84 @@ interface JSXOpeningElement extends Span {
|
|
|
2066
1891
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
2067
1892
|
attributes: Array<JSXAttributeItem>;
|
|
2068
1893
|
selfClosing: boolean;
|
|
2069
|
-
parent: Node;
|
|
1894
|
+
parent: Node$1;
|
|
2070
1895
|
}
|
|
2071
1896
|
interface JSXClosingElement extends Span {
|
|
2072
1897
|
type: "JSXClosingElement";
|
|
2073
1898
|
name: JSXElementName;
|
|
2074
|
-
parent: Node;
|
|
1899
|
+
parent: Node$1;
|
|
2075
1900
|
}
|
|
2076
1901
|
interface JSXFragment extends Span {
|
|
2077
1902
|
type: "JSXFragment";
|
|
2078
1903
|
openingFragment: JSXOpeningFragment;
|
|
2079
1904
|
children: Array<JSXChild>;
|
|
2080
1905
|
closingFragment: JSXClosingFragment;
|
|
2081
|
-
parent: Node;
|
|
1906
|
+
parent: Node$1;
|
|
2082
1907
|
}
|
|
2083
1908
|
interface JSXOpeningFragment extends Span {
|
|
2084
1909
|
type: "JSXOpeningFragment";
|
|
2085
1910
|
attributes?: [];
|
|
2086
1911
|
selfClosing?: false;
|
|
2087
|
-
parent: Node;
|
|
1912
|
+
parent: Node$1;
|
|
2088
1913
|
}
|
|
2089
1914
|
interface JSXClosingFragment extends Span {
|
|
2090
1915
|
type: "JSXClosingFragment";
|
|
2091
|
-
parent: Node;
|
|
1916
|
+
parent: Node$1;
|
|
2092
1917
|
}
|
|
2093
1918
|
type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression;
|
|
2094
1919
|
interface JSXNamespacedName extends Span {
|
|
2095
1920
|
type: "JSXNamespacedName";
|
|
2096
1921
|
namespace: JSXIdentifier;
|
|
2097
1922
|
name: JSXIdentifier;
|
|
2098
|
-
parent: Node;
|
|
1923
|
+
parent: Node$1;
|
|
2099
1924
|
}
|
|
2100
1925
|
interface JSXMemberExpression extends Span {
|
|
2101
1926
|
type: "JSXMemberExpression";
|
|
2102
1927
|
object: JSXMemberExpressionObject;
|
|
2103
1928
|
property: JSXIdentifier;
|
|
2104
|
-
parent: Node;
|
|
1929
|
+
parent: Node$1;
|
|
2105
1930
|
}
|
|
2106
1931
|
type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
|
|
2107
1932
|
interface JSXExpressionContainer extends Span {
|
|
2108
1933
|
type: "JSXExpressionContainer";
|
|
2109
1934
|
expression: JSXExpression;
|
|
2110
|
-
parent: Node;
|
|
1935
|
+
parent: Node$1;
|
|
2111
1936
|
}
|
|
2112
1937
|
type JSXExpression = JSXEmptyExpression | Expression;
|
|
2113
1938
|
interface JSXEmptyExpression extends Span {
|
|
2114
1939
|
type: "JSXEmptyExpression";
|
|
2115
|
-
parent: Node;
|
|
1940
|
+
parent: Node$1;
|
|
2116
1941
|
}
|
|
2117
1942
|
type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
|
|
2118
1943
|
interface JSXAttribute extends Span {
|
|
2119
1944
|
type: "JSXAttribute";
|
|
2120
1945
|
name: JSXAttributeName;
|
|
2121
1946
|
value: JSXAttributeValue | null;
|
|
2122
|
-
parent: Node;
|
|
1947
|
+
parent: Node$1;
|
|
2123
1948
|
}
|
|
2124
1949
|
interface JSXSpreadAttribute extends Span {
|
|
2125
1950
|
type: "JSXSpreadAttribute";
|
|
2126
1951
|
argument: Expression;
|
|
2127
|
-
parent: Node;
|
|
1952
|
+
parent: Node$1;
|
|
2128
1953
|
}
|
|
2129
1954
|
type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
|
|
2130
1955
|
type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
|
|
2131
1956
|
interface JSXIdentifier extends Span {
|
|
2132
1957
|
type: "JSXIdentifier";
|
|
2133
1958
|
name: string;
|
|
2134
|
-
parent: Node;
|
|
1959
|
+
parent: Node$1;
|
|
2135
1960
|
}
|
|
2136
1961
|
type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
|
|
2137
1962
|
interface JSXSpreadChild extends Span {
|
|
2138
1963
|
type: "JSXSpreadChild";
|
|
2139
1964
|
expression: Expression;
|
|
2140
|
-
parent: Node;
|
|
1965
|
+
parent: Node$1;
|
|
2141
1966
|
}
|
|
2142
1967
|
interface JSXText extends Span {
|
|
2143
1968
|
type: "JSXText";
|
|
2144
1969
|
value: string;
|
|
2145
1970
|
raw: string | null;
|
|
2146
|
-
parent: Node;
|
|
1971
|
+
parent: Node$1;
|
|
2147
1972
|
}
|
|
2148
1973
|
interface TSThisParameter extends Span {
|
|
2149
1974
|
type: "Identifier";
|
|
@@ -2151,7 +1976,7 @@ interface TSThisParameter extends Span {
|
|
|
2151
1976
|
name: "this";
|
|
2152
1977
|
optional: false;
|
|
2153
1978
|
typeAnnotation: TSTypeAnnotation | null;
|
|
2154
|
-
parent: Node;
|
|
1979
|
+
parent: Node$1;
|
|
2155
1980
|
}
|
|
2156
1981
|
interface TSEnumDeclaration extends Span {
|
|
2157
1982
|
type: "TSEnumDeclaration";
|
|
@@ -2159,30 +1984,30 @@ interface TSEnumDeclaration extends Span {
|
|
|
2159
1984
|
body: TSEnumBody;
|
|
2160
1985
|
const: boolean;
|
|
2161
1986
|
declare: boolean;
|
|
2162
|
-
parent: Node;
|
|
1987
|
+
parent: Node$1;
|
|
2163
1988
|
}
|
|
2164
1989
|
interface TSEnumBody extends Span {
|
|
2165
1990
|
type: "TSEnumBody";
|
|
2166
1991
|
members: Array<TSEnumMember>;
|
|
2167
|
-
parent: Node;
|
|
1992
|
+
parent: Node$1;
|
|
2168
1993
|
}
|
|
2169
1994
|
interface TSEnumMember extends Span {
|
|
2170
1995
|
type: "TSEnumMember";
|
|
2171
1996
|
id: TSEnumMemberName;
|
|
2172
1997
|
initializer: Expression | null;
|
|
2173
1998
|
computed: boolean;
|
|
2174
|
-
parent: Node;
|
|
1999
|
+
parent: Node$1;
|
|
2175
2000
|
}
|
|
2176
2001
|
type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral;
|
|
2177
2002
|
interface TSTypeAnnotation extends Span {
|
|
2178
2003
|
type: "TSTypeAnnotation";
|
|
2179
2004
|
typeAnnotation: TSType;
|
|
2180
|
-
parent: Node;
|
|
2005
|
+
parent: Node$1;
|
|
2181
2006
|
}
|
|
2182
2007
|
interface TSLiteralType extends Span {
|
|
2183
2008
|
type: "TSLiteralType";
|
|
2184
2009
|
literal: TSLiteral;
|
|
2185
|
-
parent: Node;
|
|
2010
|
+
parent: Node$1;
|
|
2186
2011
|
}
|
|
2187
2012
|
type TSLiteral = BooleanLiteral | NumericLiteral | BigIntLiteral | StringLiteral | TemplateLiteral | UnaryExpression;
|
|
2188
2013
|
type TSType = TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSArrayType | TSConditionalType | TSConstructorType | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSLiteralType | TSMappedType | TSNamedTupleMember | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUnionType | TSParenthesizedType | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType;
|
|
@@ -2192,137 +2017,137 @@ interface TSConditionalType extends Span {
|
|
|
2192
2017
|
extendsType: TSType;
|
|
2193
2018
|
trueType: TSType;
|
|
2194
2019
|
falseType: TSType;
|
|
2195
|
-
parent: Node;
|
|
2020
|
+
parent: Node$1;
|
|
2196
2021
|
}
|
|
2197
2022
|
interface TSUnionType extends Span {
|
|
2198
2023
|
type: "TSUnionType";
|
|
2199
2024
|
types: Array<TSType>;
|
|
2200
|
-
parent: Node;
|
|
2025
|
+
parent: Node$1;
|
|
2201
2026
|
}
|
|
2202
2027
|
interface TSIntersectionType extends Span {
|
|
2203
2028
|
type: "TSIntersectionType";
|
|
2204
2029
|
types: Array<TSType>;
|
|
2205
|
-
parent: Node;
|
|
2030
|
+
parent: Node$1;
|
|
2206
2031
|
}
|
|
2207
2032
|
interface TSParenthesizedType extends Span {
|
|
2208
2033
|
type: "TSParenthesizedType";
|
|
2209
2034
|
typeAnnotation: TSType;
|
|
2210
|
-
parent: Node;
|
|
2035
|
+
parent: Node$1;
|
|
2211
2036
|
}
|
|
2212
2037
|
interface TSTypeOperator extends Span {
|
|
2213
2038
|
type: "TSTypeOperator";
|
|
2214
2039
|
operator: TSTypeOperatorOperator;
|
|
2215
2040
|
typeAnnotation: TSType;
|
|
2216
|
-
parent: Node;
|
|
2041
|
+
parent: Node$1;
|
|
2217
2042
|
}
|
|
2218
2043
|
type TSTypeOperatorOperator = "keyof" | "unique" | "readonly";
|
|
2219
2044
|
interface TSArrayType extends Span {
|
|
2220
2045
|
type: "TSArrayType";
|
|
2221
2046
|
elementType: TSType;
|
|
2222
|
-
parent: Node;
|
|
2047
|
+
parent: Node$1;
|
|
2223
2048
|
}
|
|
2224
2049
|
interface TSIndexedAccessType extends Span {
|
|
2225
2050
|
type: "TSIndexedAccessType";
|
|
2226
2051
|
objectType: TSType;
|
|
2227
2052
|
indexType: TSType;
|
|
2228
|
-
parent: Node;
|
|
2053
|
+
parent: Node$1;
|
|
2229
2054
|
}
|
|
2230
2055
|
interface TSTupleType extends Span {
|
|
2231
2056
|
type: "TSTupleType";
|
|
2232
2057
|
elementTypes: Array<TSTupleElement>;
|
|
2233
|
-
parent: Node;
|
|
2058
|
+
parent: Node$1;
|
|
2234
2059
|
}
|
|
2235
2060
|
interface TSNamedTupleMember extends Span {
|
|
2236
2061
|
type: "TSNamedTupleMember";
|
|
2237
2062
|
label: IdentifierName;
|
|
2238
2063
|
elementType: TSTupleElement;
|
|
2239
2064
|
optional: boolean;
|
|
2240
|
-
parent: Node;
|
|
2065
|
+
parent: Node$1;
|
|
2241
2066
|
}
|
|
2242
2067
|
interface TSOptionalType extends Span {
|
|
2243
2068
|
type: "TSOptionalType";
|
|
2244
2069
|
typeAnnotation: TSType;
|
|
2245
|
-
parent: Node;
|
|
2070
|
+
parent: Node$1;
|
|
2246
2071
|
}
|
|
2247
2072
|
interface TSRestType extends Span {
|
|
2248
2073
|
type: "TSRestType";
|
|
2249
2074
|
typeAnnotation: TSType;
|
|
2250
|
-
parent: Node;
|
|
2075
|
+
parent: Node$1;
|
|
2251
2076
|
}
|
|
2252
2077
|
type TSTupleElement = TSOptionalType | TSRestType | TSType;
|
|
2253
2078
|
interface TSAnyKeyword extends Span {
|
|
2254
2079
|
type: "TSAnyKeyword";
|
|
2255
|
-
parent: Node;
|
|
2080
|
+
parent: Node$1;
|
|
2256
2081
|
}
|
|
2257
2082
|
interface TSStringKeyword extends Span {
|
|
2258
2083
|
type: "TSStringKeyword";
|
|
2259
|
-
parent: Node;
|
|
2084
|
+
parent: Node$1;
|
|
2260
2085
|
}
|
|
2261
2086
|
interface TSBooleanKeyword extends Span {
|
|
2262
2087
|
type: "TSBooleanKeyword";
|
|
2263
|
-
parent: Node;
|
|
2088
|
+
parent: Node$1;
|
|
2264
2089
|
}
|
|
2265
2090
|
interface TSNumberKeyword extends Span {
|
|
2266
2091
|
type: "TSNumberKeyword";
|
|
2267
|
-
parent: Node;
|
|
2092
|
+
parent: Node$1;
|
|
2268
2093
|
}
|
|
2269
2094
|
interface TSNeverKeyword extends Span {
|
|
2270
2095
|
type: "TSNeverKeyword";
|
|
2271
|
-
parent: Node;
|
|
2096
|
+
parent: Node$1;
|
|
2272
2097
|
}
|
|
2273
2098
|
interface TSIntrinsicKeyword extends Span {
|
|
2274
2099
|
type: "TSIntrinsicKeyword";
|
|
2275
|
-
parent: Node;
|
|
2100
|
+
parent: Node$1;
|
|
2276
2101
|
}
|
|
2277
2102
|
interface TSUnknownKeyword extends Span {
|
|
2278
2103
|
type: "TSUnknownKeyword";
|
|
2279
|
-
parent: Node;
|
|
2104
|
+
parent: Node$1;
|
|
2280
2105
|
}
|
|
2281
2106
|
interface TSNullKeyword extends Span {
|
|
2282
2107
|
type: "TSNullKeyword";
|
|
2283
|
-
parent: Node;
|
|
2108
|
+
parent: Node$1;
|
|
2284
2109
|
}
|
|
2285
2110
|
interface TSUndefinedKeyword extends Span {
|
|
2286
2111
|
type: "TSUndefinedKeyword";
|
|
2287
|
-
parent: Node;
|
|
2112
|
+
parent: Node$1;
|
|
2288
2113
|
}
|
|
2289
2114
|
interface TSVoidKeyword extends Span {
|
|
2290
2115
|
type: "TSVoidKeyword";
|
|
2291
|
-
parent: Node;
|
|
2116
|
+
parent: Node$1;
|
|
2292
2117
|
}
|
|
2293
2118
|
interface TSSymbolKeyword extends Span {
|
|
2294
2119
|
type: "TSSymbolKeyword";
|
|
2295
|
-
parent: Node;
|
|
2120
|
+
parent: Node$1;
|
|
2296
2121
|
}
|
|
2297
2122
|
interface TSThisType extends Span {
|
|
2298
2123
|
type: "TSThisType";
|
|
2299
|
-
parent: Node;
|
|
2124
|
+
parent: Node$1;
|
|
2300
2125
|
}
|
|
2301
2126
|
interface TSObjectKeyword extends Span {
|
|
2302
2127
|
type: "TSObjectKeyword";
|
|
2303
|
-
parent: Node;
|
|
2128
|
+
parent: Node$1;
|
|
2304
2129
|
}
|
|
2305
2130
|
interface TSBigIntKeyword extends Span {
|
|
2306
2131
|
type: "TSBigIntKeyword";
|
|
2307
|
-
parent: Node;
|
|
2132
|
+
parent: Node$1;
|
|
2308
2133
|
}
|
|
2309
2134
|
interface TSTypeReference extends Span {
|
|
2310
2135
|
type: "TSTypeReference";
|
|
2311
2136
|
typeName: TSTypeName;
|
|
2312
2137
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
2313
|
-
parent: Node;
|
|
2138
|
+
parent: Node$1;
|
|
2314
2139
|
}
|
|
2315
2140
|
type TSTypeName = IdentifierReference | TSQualifiedName | ThisExpression;
|
|
2316
2141
|
interface TSQualifiedName extends Span {
|
|
2317
2142
|
type: "TSQualifiedName";
|
|
2318
2143
|
left: TSTypeName;
|
|
2319
2144
|
right: IdentifierName;
|
|
2320
|
-
parent: Node;
|
|
2145
|
+
parent: Node$1;
|
|
2321
2146
|
}
|
|
2322
2147
|
interface TSTypeParameterInstantiation extends Span {
|
|
2323
2148
|
type: "TSTypeParameterInstantiation";
|
|
2324
2149
|
params: Array<TSType>;
|
|
2325
|
-
parent: Node;
|
|
2150
|
+
parent: Node$1;
|
|
2326
2151
|
}
|
|
2327
2152
|
interface TSTypeParameter extends Span {
|
|
2328
2153
|
type: "TSTypeParameter";
|
|
@@ -2332,12 +2157,12 @@ interface TSTypeParameter extends Span {
|
|
|
2332
2157
|
in: boolean;
|
|
2333
2158
|
out: boolean;
|
|
2334
2159
|
const: boolean;
|
|
2335
|
-
parent: Node;
|
|
2160
|
+
parent: Node$1;
|
|
2336
2161
|
}
|
|
2337
2162
|
interface TSTypeParameterDeclaration extends Span {
|
|
2338
2163
|
type: "TSTypeParameterDeclaration";
|
|
2339
2164
|
params: Array<TSTypeParameter>;
|
|
2340
|
-
parent: Node;
|
|
2165
|
+
parent: Node$1;
|
|
2341
2166
|
}
|
|
2342
2167
|
interface TSTypeAliasDeclaration extends Span {
|
|
2343
2168
|
type: "TSTypeAliasDeclaration";
|
|
@@ -2345,14 +2170,14 @@ interface TSTypeAliasDeclaration extends Span {
|
|
|
2345
2170
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
2346
2171
|
typeAnnotation: TSType;
|
|
2347
2172
|
declare: boolean;
|
|
2348
|
-
parent: Node;
|
|
2173
|
+
parent: Node$1;
|
|
2349
2174
|
}
|
|
2350
2175
|
type TSAccessibility = "private" | "protected" | "public";
|
|
2351
2176
|
interface TSClassImplements extends Span {
|
|
2352
2177
|
type: "TSClassImplements";
|
|
2353
2178
|
expression: IdentifierReference | ThisExpression | MemberExpression;
|
|
2354
2179
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
2355
|
-
parent: Node;
|
|
2180
|
+
parent: Node$1;
|
|
2356
2181
|
}
|
|
2357
2182
|
interface TSInterfaceDeclaration extends Span {
|
|
2358
2183
|
type: "TSInterfaceDeclaration";
|
|
@@ -2361,12 +2186,12 @@ interface TSInterfaceDeclaration extends Span {
|
|
|
2361
2186
|
extends: Array<TSInterfaceHeritage>;
|
|
2362
2187
|
body: TSInterfaceBody;
|
|
2363
2188
|
declare: boolean;
|
|
2364
|
-
parent: Node;
|
|
2189
|
+
parent: Node$1;
|
|
2365
2190
|
}
|
|
2366
2191
|
interface TSInterfaceBody extends Span {
|
|
2367
2192
|
type: "TSInterfaceBody";
|
|
2368
2193
|
body: Array<TSSignature>;
|
|
2369
|
-
parent: Node;
|
|
2194
|
+
parent: Node$1;
|
|
2370
2195
|
}
|
|
2371
2196
|
interface TSPropertySignature extends Span {
|
|
2372
2197
|
type: "TSPropertySignature";
|
|
@@ -2377,7 +2202,7 @@ interface TSPropertySignature extends Span {
|
|
|
2377
2202
|
typeAnnotation: TSTypeAnnotation | null;
|
|
2378
2203
|
accessibility: null;
|
|
2379
2204
|
static: false;
|
|
2380
|
-
parent: Node;
|
|
2205
|
+
parent: Node$1;
|
|
2381
2206
|
}
|
|
2382
2207
|
type TSSignature = TSIndexSignature | TSPropertySignature | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSMethodSignature;
|
|
2383
2208
|
interface TSIndexSignature extends Span {
|
|
@@ -2387,14 +2212,14 @@ interface TSIndexSignature extends Span {
|
|
|
2387
2212
|
readonly: boolean;
|
|
2388
2213
|
static: boolean;
|
|
2389
2214
|
accessibility: null;
|
|
2390
|
-
parent: Node;
|
|
2215
|
+
parent: Node$1;
|
|
2391
2216
|
}
|
|
2392
2217
|
interface TSCallSignatureDeclaration extends Span {
|
|
2393
2218
|
type: "TSCallSignatureDeclaration";
|
|
2394
2219
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
2395
2220
|
params: ParamPattern[];
|
|
2396
2221
|
returnType: TSTypeAnnotation | null;
|
|
2397
|
-
parent: Node;
|
|
2222
|
+
parent: Node$1;
|
|
2398
2223
|
}
|
|
2399
2224
|
type TSMethodSignatureKind = "method" | "get" | "set";
|
|
2400
2225
|
interface TSMethodSignature extends Span {
|
|
@@ -2409,14 +2234,14 @@ interface TSMethodSignature extends Span {
|
|
|
2409
2234
|
accessibility: null;
|
|
2410
2235
|
readonly: false;
|
|
2411
2236
|
static: false;
|
|
2412
|
-
parent: Node;
|
|
2237
|
+
parent: Node$1;
|
|
2413
2238
|
}
|
|
2414
2239
|
interface TSConstructSignatureDeclaration extends Span {
|
|
2415
2240
|
type: "TSConstructSignatureDeclaration";
|
|
2416
2241
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
2417
2242
|
params: ParamPattern[];
|
|
2418
2243
|
returnType: TSTypeAnnotation | null;
|
|
2419
|
-
parent: Node;
|
|
2244
|
+
parent: Node$1;
|
|
2420
2245
|
}
|
|
2421
2246
|
interface TSIndexSignatureName extends Span {
|
|
2422
2247
|
type: "Identifier";
|
|
@@ -2424,20 +2249,20 @@ interface TSIndexSignatureName extends Span {
|
|
|
2424
2249
|
name: string;
|
|
2425
2250
|
optional: false;
|
|
2426
2251
|
typeAnnotation: TSTypeAnnotation;
|
|
2427
|
-
parent: Node;
|
|
2252
|
+
parent: Node$1;
|
|
2428
2253
|
}
|
|
2429
2254
|
interface TSInterfaceHeritage extends Span {
|
|
2430
2255
|
type: "TSInterfaceHeritage";
|
|
2431
2256
|
expression: Expression;
|
|
2432
2257
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
2433
|
-
parent: Node;
|
|
2258
|
+
parent: Node$1;
|
|
2434
2259
|
}
|
|
2435
2260
|
interface TSTypePredicate extends Span {
|
|
2436
2261
|
type: "TSTypePredicate";
|
|
2437
2262
|
parameterName: TSTypePredicateName;
|
|
2438
2263
|
asserts: boolean;
|
|
2439
2264
|
typeAnnotation: TSTypeAnnotation | null;
|
|
2440
|
-
parent: Node;
|
|
2265
|
+
parent: Node$1;
|
|
2441
2266
|
}
|
|
2442
2267
|
type TSTypePredicateName = IdentifierName | TSThisType;
|
|
2443
2268
|
type TSModuleDeclarationKind = "module" | "namespace";
|
|
@@ -2448,7 +2273,7 @@ interface TSModuleDeclaration extends Span {
|
|
|
2448
2273
|
kind: TSModuleDeclarationKind;
|
|
2449
2274
|
declare: boolean;
|
|
2450
2275
|
global: false;
|
|
2451
|
-
parent: Node;
|
|
2276
|
+
parent: Node$1;
|
|
2452
2277
|
}
|
|
2453
2278
|
interface TSGlobalDeclaration extends Span {
|
|
2454
2279
|
type: "TSModuleDeclaration";
|
|
@@ -2457,28 +2282,28 @@ interface TSGlobalDeclaration extends Span {
|
|
|
2457
2282
|
kind: "global";
|
|
2458
2283
|
declare: boolean;
|
|
2459
2284
|
global: true;
|
|
2460
|
-
parent: Node;
|
|
2285
|
+
parent: Node$1;
|
|
2461
2286
|
}
|
|
2462
2287
|
interface TSModuleBlock extends Span {
|
|
2463
2288
|
type: "TSModuleBlock";
|
|
2464
2289
|
body: Array<Directive$1 | Statement>;
|
|
2465
|
-
parent: Node;
|
|
2290
|
+
parent: Node$1;
|
|
2466
2291
|
}
|
|
2467
2292
|
interface TSTypeLiteral extends Span {
|
|
2468
2293
|
type: "TSTypeLiteral";
|
|
2469
2294
|
members: Array<TSSignature>;
|
|
2470
|
-
parent: Node;
|
|
2295
|
+
parent: Node$1;
|
|
2471
2296
|
}
|
|
2472
2297
|
interface TSInferType extends Span {
|
|
2473
2298
|
type: "TSInferType";
|
|
2474
2299
|
typeParameter: TSTypeParameter;
|
|
2475
|
-
parent: Node;
|
|
2300
|
+
parent: Node$1;
|
|
2476
2301
|
}
|
|
2477
2302
|
interface TSTypeQuery extends Span {
|
|
2478
2303
|
type: "TSTypeQuery";
|
|
2479
2304
|
exprName: TSTypeQueryExprName;
|
|
2480
2305
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
2481
|
-
parent: Node;
|
|
2306
|
+
parent: Node$1;
|
|
2482
2307
|
}
|
|
2483
2308
|
type TSTypeQueryExprName = TSImportType | TSTypeName;
|
|
2484
2309
|
interface TSImportType extends Span {
|
|
@@ -2487,21 +2312,21 @@ interface TSImportType extends Span {
|
|
|
2487
2312
|
options: ObjectExpression | null;
|
|
2488
2313
|
qualifier: TSImportTypeQualifier | null;
|
|
2489
2314
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
2490
|
-
parent: Node;
|
|
2315
|
+
parent: Node$1;
|
|
2491
2316
|
}
|
|
2492
2317
|
type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName;
|
|
2493
2318
|
interface TSImportTypeQualifiedName extends Span {
|
|
2494
2319
|
type: "TSQualifiedName";
|
|
2495
2320
|
left: TSImportTypeQualifier;
|
|
2496
2321
|
right: IdentifierName;
|
|
2497
|
-
parent: Node;
|
|
2322
|
+
parent: Node$1;
|
|
2498
2323
|
}
|
|
2499
2324
|
interface TSFunctionType extends Span {
|
|
2500
2325
|
type: "TSFunctionType";
|
|
2501
2326
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
2502
2327
|
params: ParamPattern[];
|
|
2503
2328
|
returnType: TSTypeAnnotation;
|
|
2504
|
-
parent: Node;
|
|
2329
|
+
parent: Node$1;
|
|
2505
2330
|
}
|
|
2506
2331
|
interface TSConstructorType extends Span {
|
|
2507
2332
|
type: "TSConstructorType";
|
|
@@ -2509,7 +2334,7 @@ interface TSConstructorType extends Span {
|
|
|
2509
2334
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
2510
2335
|
params: ParamPattern[];
|
|
2511
2336
|
returnType: TSTypeAnnotation;
|
|
2512
|
-
parent: Node;
|
|
2337
|
+
parent: Node$1;
|
|
2513
2338
|
}
|
|
2514
2339
|
interface TSMappedType extends Span {
|
|
2515
2340
|
type: "TSMappedType";
|
|
@@ -2519,105 +2344,728 @@ interface TSMappedType extends Span {
|
|
|
2519
2344
|
typeAnnotation: TSType | null;
|
|
2520
2345
|
optional: TSMappedTypeModifierOperator | false;
|
|
2521
2346
|
readonly: TSMappedTypeModifierOperator | null;
|
|
2522
|
-
parent: Node;
|
|
2347
|
+
parent: Node$1;
|
|
2348
|
+
}
|
|
2349
|
+
type TSMappedTypeModifierOperator = true | "+" | "-";
|
|
2350
|
+
interface TSTemplateLiteralType extends Span {
|
|
2351
|
+
type: "TSTemplateLiteralType";
|
|
2352
|
+
quasis: Array<TemplateElement>;
|
|
2353
|
+
types: Array<TSType>;
|
|
2354
|
+
parent: Node$1;
|
|
2355
|
+
}
|
|
2356
|
+
interface TSAsExpression extends Span {
|
|
2357
|
+
type: "TSAsExpression";
|
|
2358
|
+
expression: Expression;
|
|
2359
|
+
typeAnnotation: TSType;
|
|
2360
|
+
parent: Node$1;
|
|
2361
|
+
}
|
|
2362
|
+
interface TSSatisfiesExpression extends Span {
|
|
2363
|
+
type: "TSSatisfiesExpression";
|
|
2364
|
+
expression: Expression;
|
|
2365
|
+
typeAnnotation: TSType;
|
|
2366
|
+
parent: Node$1;
|
|
2367
|
+
}
|
|
2368
|
+
interface TSTypeAssertion extends Span {
|
|
2369
|
+
type: "TSTypeAssertion";
|
|
2370
|
+
typeAnnotation: TSType;
|
|
2371
|
+
expression: Expression;
|
|
2372
|
+
parent: Node$1;
|
|
2373
|
+
}
|
|
2374
|
+
interface TSImportEqualsDeclaration extends Span {
|
|
2375
|
+
type: "TSImportEqualsDeclaration";
|
|
2376
|
+
id: BindingIdentifier;
|
|
2377
|
+
moduleReference: TSModuleReference;
|
|
2378
|
+
importKind: ImportOrExportKind;
|
|
2379
|
+
parent: Node$1;
|
|
2380
|
+
}
|
|
2381
|
+
type TSModuleReference = TSExternalModuleReference | IdentifierReference | TSQualifiedName;
|
|
2382
|
+
interface TSExternalModuleReference extends Span {
|
|
2383
|
+
type: "TSExternalModuleReference";
|
|
2384
|
+
expression: StringLiteral;
|
|
2385
|
+
parent: Node$1;
|
|
2386
|
+
}
|
|
2387
|
+
interface TSNonNullExpression extends Span {
|
|
2388
|
+
type: "TSNonNullExpression";
|
|
2389
|
+
expression: Expression;
|
|
2390
|
+
parent: Node$1;
|
|
2391
|
+
}
|
|
2392
|
+
interface Decorator extends Span {
|
|
2393
|
+
type: "Decorator";
|
|
2394
|
+
expression: Expression;
|
|
2395
|
+
parent: Node$1;
|
|
2396
|
+
}
|
|
2397
|
+
interface TSExportAssignment extends Span {
|
|
2398
|
+
type: "TSExportAssignment";
|
|
2399
|
+
expression: Expression;
|
|
2400
|
+
parent: Node$1;
|
|
2401
|
+
}
|
|
2402
|
+
interface TSNamespaceExportDeclaration extends Span {
|
|
2403
|
+
type: "TSNamespaceExportDeclaration";
|
|
2404
|
+
id: IdentifierName;
|
|
2405
|
+
parent: Node$1;
|
|
2406
|
+
}
|
|
2407
|
+
interface TSInstantiationExpression extends Span {
|
|
2408
|
+
type: "TSInstantiationExpression";
|
|
2409
|
+
expression: Expression;
|
|
2410
|
+
typeArguments: TSTypeParameterInstantiation;
|
|
2411
|
+
parent: Node$1;
|
|
2412
|
+
}
|
|
2413
|
+
type ImportOrExportKind = "value" | "type";
|
|
2414
|
+
interface JSDocNullableType extends Span {
|
|
2415
|
+
type: "TSJSDocNullableType";
|
|
2416
|
+
typeAnnotation: TSType;
|
|
2417
|
+
postfix: boolean;
|
|
2418
|
+
parent: Node$1;
|
|
2419
|
+
}
|
|
2420
|
+
interface JSDocNonNullableType extends Span {
|
|
2421
|
+
type: "TSJSDocNonNullableType";
|
|
2422
|
+
typeAnnotation: TSType;
|
|
2423
|
+
postfix: boolean;
|
|
2424
|
+
parent: Node$1;
|
|
2425
|
+
}
|
|
2426
|
+
interface JSDocUnknownType extends Span {
|
|
2427
|
+
type: "TSJSDocUnknownType";
|
|
2428
|
+
parent: Node$1;
|
|
2429
|
+
}
|
|
2430
|
+
type ModuleKind = "script" | "module" | "commonjs";
|
|
2431
|
+
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
|
|
2432
|
+
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
|
|
2433
|
+
type LogicalOperator = "||" | "&&" | "??";
|
|
2434
|
+
type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
2435
|
+
type UpdateOperator = "++" | "--";
|
|
2436
|
+
type Node$1 = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive$1 | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
|
|
2437
|
+
//#endregion
|
|
2438
|
+
//#region src-js/generated/visitor.d.ts
|
|
2439
|
+
// To understand why we need the "Bivariance hack", see: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/20219
|
|
2440
|
+
// For downsides, see: https://github.com/oxc-project/oxc/issues/18154#issuecomment-4012955607
|
|
2441
|
+
type BivarianceHackHandler<Handler extends (...args: any) => any> = {
|
|
2442
|
+
bivarianceHack(...args: Parameters<Handler>): ReturnType<Handler>;
|
|
2443
|
+
}["bivarianceHack"];
|
|
2444
|
+
interface StrictVisitorObject {
|
|
2445
|
+
DebuggerStatement?: (node: DebuggerStatement) => void;
|
|
2446
|
+
"DebuggerStatement:exit"?: (node: DebuggerStatement) => void;
|
|
2447
|
+
EmptyStatement?: (node: EmptyStatement) => void;
|
|
2448
|
+
"EmptyStatement:exit"?: (node: EmptyStatement) => void;
|
|
2449
|
+
Literal?: (node: BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral) => void;
|
|
2450
|
+
"Literal:exit"?: (node: BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral) => void;
|
|
2451
|
+
PrivateIdentifier?: (node: PrivateIdentifier) => void;
|
|
2452
|
+
"PrivateIdentifier:exit"?: (node: PrivateIdentifier) => void;
|
|
2453
|
+
Super?: (node: Super) => void;
|
|
2454
|
+
"Super:exit"?: (node: Super) => void;
|
|
2455
|
+
TemplateElement?: (node: TemplateElement) => void;
|
|
2456
|
+
"TemplateElement:exit"?: (node: TemplateElement) => void;
|
|
2457
|
+
ThisExpression?: (node: ThisExpression) => void;
|
|
2458
|
+
"ThisExpression:exit"?: (node: ThisExpression) => void;
|
|
2459
|
+
JSXClosingFragment?: (node: JSXClosingFragment) => void;
|
|
2460
|
+
"JSXClosingFragment:exit"?: (node: JSXClosingFragment) => void;
|
|
2461
|
+
JSXEmptyExpression?: (node: JSXEmptyExpression) => void;
|
|
2462
|
+
"JSXEmptyExpression:exit"?: (node: JSXEmptyExpression) => void;
|
|
2463
|
+
JSXIdentifier?: (node: JSXIdentifier) => void;
|
|
2464
|
+
"JSXIdentifier:exit"?: (node: JSXIdentifier) => void;
|
|
2465
|
+
JSXOpeningFragment?: (node: JSXOpeningFragment) => void;
|
|
2466
|
+
"JSXOpeningFragment:exit"?: (node: JSXOpeningFragment) => void;
|
|
2467
|
+
JSXText?: (node: JSXText) => void;
|
|
2468
|
+
"JSXText:exit"?: (node: JSXText) => void;
|
|
2469
|
+
TSAnyKeyword?: (node: TSAnyKeyword) => void;
|
|
2470
|
+
"TSAnyKeyword:exit"?: (node: TSAnyKeyword) => void;
|
|
2471
|
+
TSBigIntKeyword?: (node: TSBigIntKeyword) => void;
|
|
2472
|
+
"TSBigIntKeyword:exit"?: (node: TSBigIntKeyword) => void;
|
|
2473
|
+
TSBooleanKeyword?: (node: TSBooleanKeyword) => void;
|
|
2474
|
+
"TSBooleanKeyword:exit"?: (node: TSBooleanKeyword) => void;
|
|
2475
|
+
TSIntrinsicKeyword?: (node: TSIntrinsicKeyword) => void;
|
|
2476
|
+
"TSIntrinsicKeyword:exit"?: (node: TSIntrinsicKeyword) => void;
|
|
2477
|
+
TSJSDocUnknownType?: (node: JSDocUnknownType) => void;
|
|
2478
|
+
"TSJSDocUnknownType:exit"?: (node: JSDocUnknownType) => void;
|
|
2479
|
+
TSNeverKeyword?: (node: TSNeverKeyword) => void;
|
|
2480
|
+
"TSNeverKeyword:exit"?: (node: TSNeverKeyword) => void;
|
|
2481
|
+
TSNullKeyword?: (node: TSNullKeyword) => void;
|
|
2482
|
+
"TSNullKeyword:exit"?: (node: TSNullKeyword) => void;
|
|
2483
|
+
TSNumberKeyword?: (node: TSNumberKeyword) => void;
|
|
2484
|
+
"TSNumberKeyword:exit"?: (node: TSNumberKeyword) => void;
|
|
2485
|
+
TSObjectKeyword?: (node: TSObjectKeyword) => void;
|
|
2486
|
+
"TSObjectKeyword:exit"?: (node: TSObjectKeyword) => void;
|
|
2487
|
+
TSStringKeyword?: (node: TSStringKeyword) => void;
|
|
2488
|
+
"TSStringKeyword:exit"?: (node: TSStringKeyword) => void;
|
|
2489
|
+
TSSymbolKeyword?: (node: TSSymbolKeyword) => void;
|
|
2490
|
+
"TSSymbolKeyword:exit"?: (node: TSSymbolKeyword) => void;
|
|
2491
|
+
TSThisType?: (node: TSThisType) => void;
|
|
2492
|
+
"TSThisType:exit"?: (node: TSThisType) => void;
|
|
2493
|
+
TSUndefinedKeyword?: (node: TSUndefinedKeyword) => void;
|
|
2494
|
+
"TSUndefinedKeyword:exit"?: (node: TSUndefinedKeyword) => void;
|
|
2495
|
+
TSUnknownKeyword?: (node: TSUnknownKeyword) => void;
|
|
2496
|
+
"TSUnknownKeyword:exit"?: (node: TSUnknownKeyword) => void;
|
|
2497
|
+
TSVoidKeyword?: (node: TSVoidKeyword) => void;
|
|
2498
|
+
"TSVoidKeyword:exit"?: (node: TSVoidKeyword) => void;
|
|
2499
|
+
AccessorProperty?: (node: AccessorProperty) => void;
|
|
2500
|
+
"AccessorProperty:exit"?: (node: AccessorProperty) => void;
|
|
2501
|
+
ArrayExpression?: (node: ArrayExpression) => void;
|
|
2502
|
+
"ArrayExpression:exit"?: (node: ArrayExpression) => void;
|
|
2503
|
+
ArrayPattern?: (node: ArrayPattern) => void;
|
|
2504
|
+
"ArrayPattern:exit"?: (node: ArrayPattern) => void;
|
|
2505
|
+
ArrowFunctionExpression?: (node: ArrowFunctionExpression) => void;
|
|
2506
|
+
"ArrowFunctionExpression:exit"?: (node: ArrowFunctionExpression) => void;
|
|
2507
|
+
AssignmentExpression?: (node: AssignmentExpression) => void;
|
|
2508
|
+
"AssignmentExpression:exit"?: (node: AssignmentExpression) => void;
|
|
2509
|
+
AssignmentPattern?: (node: AssignmentPattern) => void;
|
|
2510
|
+
"AssignmentPattern:exit"?: (node: AssignmentPattern) => void;
|
|
2511
|
+
AwaitExpression?: (node: AwaitExpression) => void;
|
|
2512
|
+
"AwaitExpression:exit"?: (node: AwaitExpression) => void;
|
|
2513
|
+
BinaryExpression?: (node: BinaryExpression) => void;
|
|
2514
|
+
"BinaryExpression:exit"?: (node: BinaryExpression) => void;
|
|
2515
|
+
BlockStatement?: (node: BlockStatement) => void;
|
|
2516
|
+
"BlockStatement:exit"?: (node: BlockStatement) => void;
|
|
2517
|
+
BreakStatement?: (node: BreakStatement) => void;
|
|
2518
|
+
"BreakStatement:exit"?: (node: BreakStatement) => void;
|
|
2519
|
+
CallExpression?: (node: CallExpression) => void;
|
|
2520
|
+
"CallExpression:exit"?: (node: CallExpression) => void;
|
|
2521
|
+
CatchClause?: (node: CatchClause) => void;
|
|
2522
|
+
"CatchClause:exit"?: (node: CatchClause) => void;
|
|
2523
|
+
ChainExpression?: (node: ChainExpression) => void;
|
|
2524
|
+
"ChainExpression:exit"?: (node: ChainExpression) => void;
|
|
2525
|
+
ClassBody?: (node: ClassBody) => void;
|
|
2526
|
+
"ClassBody:exit"?: (node: ClassBody) => void;
|
|
2527
|
+
ClassDeclaration?: (node: Class) => void;
|
|
2528
|
+
"ClassDeclaration:exit"?: (node: Class) => void;
|
|
2529
|
+
ClassExpression?: (node: Class) => void;
|
|
2530
|
+
"ClassExpression:exit"?: (node: Class) => void;
|
|
2531
|
+
ConditionalExpression?: (node: ConditionalExpression) => void;
|
|
2532
|
+
"ConditionalExpression:exit"?: (node: ConditionalExpression) => void;
|
|
2533
|
+
ContinueStatement?: (node: ContinueStatement) => void;
|
|
2534
|
+
"ContinueStatement:exit"?: (node: ContinueStatement) => void;
|
|
2535
|
+
Decorator?: (node: Decorator) => void;
|
|
2536
|
+
"Decorator:exit"?: (node: Decorator) => void;
|
|
2537
|
+
DoWhileStatement?: (node: DoWhileStatement) => void;
|
|
2538
|
+
"DoWhileStatement:exit"?: (node: DoWhileStatement) => void;
|
|
2539
|
+
ExportAllDeclaration?: (node: ExportAllDeclaration) => void;
|
|
2540
|
+
"ExportAllDeclaration:exit"?: (node: ExportAllDeclaration) => void;
|
|
2541
|
+
ExportDefaultDeclaration?: (node: ExportDefaultDeclaration) => void;
|
|
2542
|
+
"ExportDefaultDeclaration:exit"?: (node: ExportDefaultDeclaration) => void;
|
|
2543
|
+
ExportNamedDeclaration?: (node: ExportNamedDeclaration) => void;
|
|
2544
|
+
"ExportNamedDeclaration:exit"?: (node: ExportNamedDeclaration) => void;
|
|
2545
|
+
ExportSpecifier?: (node: ExportSpecifier) => void;
|
|
2546
|
+
"ExportSpecifier:exit"?: (node: ExportSpecifier) => void;
|
|
2547
|
+
ExpressionStatement?: (node: ExpressionStatement) => void;
|
|
2548
|
+
"ExpressionStatement:exit"?: (node: ExpressionStatement) => void;
|
|
2549
|
+
ForInStatement?: (node: ForInStatement) => void;
|
|
2550
|
+
"ForInStatement:exit"?: (node: ForInStatement) => void;
|
|
2551
|
+
ForOfStatement?: (node: ForOfStatement) => void;
|
|
2552
|
+
"ForOfStatement:exit"?: (node: ForOfStatement) => void;
|
|
2553
|
+
ForStatement?: (node: ForStatement) => void;
|
|
2554
|
+
"ForStatement:exit"?: (node: ForStatement) => void;
|
|
2555
|
+
FunctionDeclaration?: (node: Function$1) => void;
|
|
2556
|
+
"FunctionDeclaration:exit"?: (node: Function$1) => void;
|
|
2557
|
+
FunctionExpression?: (node: Function$1) => void;
|
|
2558
|
+
"FunctionExpression:exit"?: (node: Function$1) => void;
|
|
2559
|
+
Identifier?: (node: IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName) => void;
|
|
2560
|
+
"Identifier:exit"?: (node: IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName) => void;
|
|
2561
|
+
IfStatement?: (node: IfStatement) => void;
|
|
2562
|
+
"IfStatement:exit"?: (node: IfStatement) => void;
|
|
2563
|
+
ImportAttribute?: (node: ImportAttribute) => void;
|
|
2564
|
+
"ImportAttribute:exit"?: (node: ImportAttribute) => void;
|
|
2565
|
+
ImportDeclaration?: (node: ImportDeclaration) => void;
|
|
2566
|
+
"ImportDeclaration:exit"?: (node: ImportDeclaration) => void;
|
|
2567
|
+
ImportDefaultSpecifier?: (node: ImportDefaultSpecifier) => void;
|
|
2568
|
+
"ImportDefaultSpecifier:exit"?: (node: ImportDefaultSpecifier) => void;
|
|
2569
|
+
ImportExpression?: (node: ImportExpression) => void;
|
|
2570
|
+
"ImportExpression:exit"?: (node: ImportExpression) => void;
|
|
2571
|
+
ImportNamespaceSpecifier?: (node: ImportNamespaceSpecifier) => void;
|
|
2572
|
+
"ImportNamespaceSpecifier:exit"?: (node: ImportNamespaceSpecifier) => void;
|
|
2573
|
+
ImportSpecifier?: (node: ImportSpecifier) => void;
|
|
2574
|
+
"ImportSpecifier:exit"?: (node: ImportSpecifier) => void;
|
|
2575
|
+
LabeledStatement?: (node: LabeledStatement) => void;
|
|
2576
|
+
"LabeledStatement:exit"?: (node: LabeledStatement) => void;
|
|
2577
|
+
LogicalExpression?: (node: LogicalExpression) => void;
|
|
2578
|
+
"LogicalExpression:exit"?: (node: LogicalExpression) => void;
|
|
2579
|
+
MemberExpression?: (node: MemberExpression) => void;
|
|
2580
|
+
"MemberExpression:exit"?: (node: MemberExpression) => void;
|
|
2581
|
+
MetaProperty?: (node: MetaProperty) => void;
|
|
2582
|
+
"MetaProperty:exit"?: (node: MetaProperty) => void;
|
|
2583
|
+
MethodDefinition?: (node: MethodDefinition) => void;
|
|
2584
|
+
"MethodDefinition:exit"?: (node: MethodDefinition) => void;
|
|
2585
|
+
NewExpression?: (node: NewExpression) => void;
|
|
2586
|
+
"NewExpression:exit"?: (node: NewExpression) => void;
|
|
2587
|
+
ObjectExpression?: (node: ObjectExpression) => void;
|
|
2588
|
+
"ObjectExpression:exit"?: (node: ObjectExpression) => void;
|
|
2589
|
+
ObjectPattern?: (node: ObjectPattern) => void;
|
|
2590
|
+
"ObjectPattern:exit"?: (node: ObjectPattern) => void;
|
|
2591
|
+
ParenthesizedExpression?: (node: ParenthesizedExpression) => void;
|
|
2592
|
+
"ParenthesizedExpression:exit"?: (node: ParenthesizedExpression) => void;
|
|
2593
|
+
Program?: (node: Program) => void;
|
|
2594
|
+
"Program:exit"?: (node: Program) => void;
|
|
2595
|
+
Property?: (node: ObjectProperty | AssignmentTargetProperty | AssignmentTargetPropertyProperty | BindingProperty) => void;
|
|
2596
|
+
"Property:exit"?: (node: ObjectProperty | AssignmentTargetProperty | AssignmentTargetPropertyProperty | BindingProperty) => void;
|
|
2597
|
+
PropertyDefinition?: (node: PropertyDefinition) => void;
|
|
2598
|
+
"PropertyDefinition:exit"?: (node: PropertyDefinition) => void;
|
|
2599
|
+
RestElement?: (node: AssignmentTargetRest | BindingRestElement | FormalParameterRest) => void;
|
|
2600
|
+
"RestElement:exit"?: (node: AssignmentTargetRest | BindingRestElement | FormalParameterRest) => void;
|
|
2601
|
+
ReturnStatement?: (node: ReturnStatement) => void;
|
|
2602
|
+
"ReturnStatement:exit"?: (node: ReturnStatement) => void;
|
|
2603
|
+
SequenceExpression?: (node: SequenceExpression) => void;
|
|
2604
|
+
"SequenceExpression:exit"?: (node: SequenceExpression) => void;
|
|
2605
|
+
SpreadElement?: (node: SpreadElement) => void;
|
|
2606
|
+
"SpreadElement:exit"?: (node: SpreadElement) => void;
|
|
2607
|
+
StaticBlock?: (node: StaticBlock) => void;
|
|
2608
|
+
"StaticBlock:exit"?: (node: StaticBlock) => void;
|
|
2609
|
+
SwitchCase?: (node: SwitchCase) => void;
|
|
2610
|
+
"SwitchCase:exit"?: (node: SwitchCase) => void;
|
|
2611
|
+
SwitchStatement?: (node: SwitchStatement) => void;
|
|
2612
|
+
"SwitchStatement:exit"?: (node: SwitchStatement) => void;
|
|
2613
|
+
TaggedTemplateExpression?: (node: TaggedTemplateExpression) => void;
|
|
2614
|
+
"TaggedTemplateExpression:exit"?: (node: TaggedTemplateExpression) => void;
|
|
2615
|
+
TemplateLiteral?: (node: TemplateLiteral) => void;
|
|
2616
|
+
"TemplateLiteral:exit"?: (node: TemplateLiteral) => void;
|
|
2617
|
+
ThrowStatement?: (node: ThrowStatement) => void;
|
|
2618
|
+
"ThrowStatement:exit"?: (node: ThrowStatement) => void;
|
|
2619
|
+
TryStatement?: (node: TryStatement) => void;
|
|
2620
|
+
"TryStatement:exit"?: (node: TryStatement) => void;
|
|
2621
|
+
UnaryExpression?: (node: UnaryExpression) => void;
|
|
2622
|
+
"UnaryExpression:exit"?: (node: UnaryExpression) => void;
|
|
2623
|
+
UpdateExpression?: (node: UpdateExpression) => void;
|
|
2624
|
+
"UpdateExpression:exit"?: (node: UpdateExpression) => void;
|
|
2625
|
+
V8IntrinsicExpression?: (node: V8IntrinsicExpression) => void;
|
|
2626
|
+
"V8IntrinsicExpression:exit"?: (node: V8IntrinsicExpression) => void;
|
|
2627
|
+
VariableDeclaration?: (node: VariableDeclaration) => void;
|
|
2628
|
+
"VariableDeclaration:exit"?: (node: VariableDeclaration) => void;
|
|
2629
|
+
VariableDeclarator?: (node: VariableDeclarator) => void;
|
|
2630
|
+
"VariableDeclarator:exit"?: (node: VariableDeclarator) => void;
|
|
2631
|
+
WhileStatement?: (node: WhileStatement) => void;
|
|
2632
|
+
"WhileStatement:exit"?: (node: WhileStatement) => void;
|
|
2633
|
+
WithStatement?: (node: WithStatement) => void;
|
|
2634
|
+
"WithStatement:exit"?: (node: WithStatement) => void;
|
|
2635
|
+
YieldExpression?: (node: YieldExpression) => void;
|
|
2636
|
+
"YieldExpression:exit"?: (node: YieldExpression) => void;
|
|
2637
|
+
JSXAttribute?: (node: JSXAttribute) => void;
|
|
2638
|
+
"JSXAttribute:exit"?: (node: JSXAttribute) => void;
|
|
2639
|
+
JSXClosingElement?: (node: JSXClosingElement) => void;
|
|
2640
|
+
"JSXClosingElement:exit"?: (node: JSXClosingElement) => void;
|
|
2641
|
+
JSXElement?: (node: JSXElement) => void;
|
|
2642
|
+
"JSXElement:exit"?: (node: JSXElement) => void;
|
|
2643
|
+
JSXExpressionContainer?: (node: JSXExpressionContainer) => void;
|
|
2644
|
+
"JSXExpressionContainer:exit"?: (node: JSXExpressionContainer) => void;
|
|
2645
|
+
JSXFragment?: (node: JSXFragment) => void;
|
|
2646
|
+
"JSXFragment:exit"?: (node: JSXFragment) => void;
|
|
2647
|
+
JSXMemberExpression?: (node: JSXMemberExpression) => void;
|
|
2648
|
+
"JSXMemberExpression:exit"?: (node: JSXMemberExpression) => void;
|
|
2649
|
+
JSXNamespacedName?: (node: JSXNamespacedName) => void;
|
|
2650
|
+
"JSXNamespacedName:exit"?: (node: JSXNamespacedName) => void;
|
|
2651
|
+
JSXOpeningElement?: (node: JSXOpeningElement) => void;
|
|
2652
|
+
"JSXOpeningElement:exit"?: (node: JSXOpeningElement) => void;
|
|
2653
|
+
JSXSpreadAttribute?: (node: JSXSpreadAttribute) => void;
|
|
2654
|
+
"JSXSpreadAttribute:exit"?: (node: JSXSpreadAttribute) => void;
|
|
2655
|
+
JSXSpreadChild?: (node: JSXSpreadChild) => void;
|
|
2656
|
+
"JSXSpreadChild:exit"?: (node: JSXSpreadChild) => void;
|
|
2657
|
+
TSAbstractAccessorProperty?: (node: AccessorProperty) => void;
|
|
2658
|
+
"TSAbstractAccessorProperty:exit"?: (node: AccessorProperty) => void;
|
|
2659
|
+
TSAbstractMethodDefinition?: (node: MethodDefinition) => void;
|
|
2660
|
+
"TSAbstractMethodDefinition:exit"?: (node: MethodDefinition) => void;
|
|
2661
|
+
TSAbstractPropertyDefinition?: (node: PropertyDefinition) => void;
|
|
2662
|
+
"TSAbstractPropertyDefinition:exit"?: (node: PropertyDefinition) => void;
|
|
2663
|
+
TSArrayType?: (node: TSArrayType) => void;
|
|
2664
|
+
"TSArrayType:exit"?: (node: TSArrayType) => void;
|
|
2665
|
+
TSAsExpression?: (node: TSAsExpression) => void;
|
|
2666
|
+
"TSAsExpression:exit"?: (node: TSAsExpression) => void;
|
|
2667
|
+
TSCallSignatureDeclaration?: (node: TSCallSignatureDeclaration) => void;
|
|
2668
|
+
"TSCallSignatureDeclaration:exit"?: (node: TSCallSignatureDeclaration) => void;
|
|
2669
|
+
TSClassImplements?: (node: TSClassImplements) => void;
|
|
2670
|
+
"TSClassImplements:exit"?: (node: TSClassImplements) => void;
|
|
2671
|
+
TSConditionalType?: (node: TSConditionalType) => void;
|
|
2672
|
+
"TSConditionalType:exit"?: (node: TSConditionalType) => void;
|
|
2673
|
+
TSConstructSignatureDeclaration?: (node: TSConstructSignatureDeclaration) => void;
|
|
2674
|
+
"TSConstructSignatureDeclaration:exit"?: (node: TSConstructSignatureDeclaration) => void;
|
|
2675
|
+
TSConstructorType?: (node: TSConstructorType) => void;
|
|
2676
|
+
"TSConstructorType:exit"?: (node: TSConstructorType) => void;
|
|
2677
|
+
TSDeclareFunction?: (node: Function$1) => void;
|
|
2678
|
+
"TSDeclareFunction:exit"?: (node: Function$1) => void;
|
|
2679
|
+
TSEmptyBodyFunctionExpression?: (node: Function$1) => void;
|
|
2680
|
+
"TSEmptyBodyFunctionExpression:exit"?: (node: Function$1) => void;
|
|
2681
|
+
TSEnumBody?: (node: TSEnumBody) => void;
|
|
2682
|
+
"TSEnumBody:exit"?: (node: TSEnumBody) => void;
|
|
2683
|
+
TSEnumDeclaration?: (node: TSEnumDeclaration) => void;
|
|
2684
|
+
"TSEnumDeclaration:exit"?: (node: TSEnumDeclaration) => void;
|
|
2685
|
+
TSEnumMember?: (node: TSEnumMember) => void;
|
|
2686
|
+
"TSEnumMember:exit"?: (node: TSEnumMember) => void;
|
|
2687
|
+
TSExportAssignment?: (node: TSExportAssignment) => void;
|
|
2688
|
+
"TSExportAssignment:exit"?: (node: TSExportAssignment) => void;
|
|
2689
|
+
TSExternalModuleReference?: (node: TSExternalModuleReference) => void;
|
|
2690
|
+
"TSExternalModuleReference:exit"?: (node: TSExternalModuleReference) => void;
|
|
2691
|
+
TSFunctionType?: (node: TSFunctionType) => void;
|
|
2692
|
+
"TSFunctionType:exit"?: (node: TSFunctionType) => void;
|
|
2693
|
+
TSImportEqualsDeclaration?: (node: TSImportEqualsDeclaration) => void;
|
|
2694
|
+
"TSImportEqualsDeclaration:exit"?: (node: TSImportEqualsDeclaration) => void;
|
|
2695
|
+
TSImportType?: (node: TSImportType) => void;
|
|
2696
|
+
"TSImportType:exit"?: (node: TSImportType) => void;
|
|
2697
|
+
TSIndexSignature?: (node: TSIndexSignature) => void;
|
|
2698
|
+
"TSIndexSignature:exit"?: (node: TSIndexSignature) => void;
|
|
2699
|
+
TSIndexedAccessType?: (node: TSIndexedAccessType) => void;
|
|
2700
|
+
"TSIndexedAccessType:exit"?: (node: TSIndexedAccessType) => void;
|
|
2701
|
+
TSInferType?: (node: TSInferType) => void;
|
|
2702
|
+
"TSInferType:exit"?: (node: TSInferType) => void;
|
|
2703
|
+
TSInstantiationExpression?: (node: TSInstantiationExpression) => void;
|
|
2704
|
+
"TSInstantiationExpression:exit"?: (node: TSInstantiationExpression) => void;
|
|
2705
|
+
TSInterfaceBody?: (node: TSInterfaceBody) => void;
|
|
2706
|
+
"TSInterfaceBody:exit"?: (node: TSInterfaceBody) => void;
|
|
2707
|
+
TSInterfaceDeclaration?: (node: TSInterfaceDeclaration) => void;
|
|
2708
|
+
"TSInterfaceDeclaration:exit"?: (node: TSInterfaceDeclaration) => void;
|
|
2709
|
+
TSInterfaceHeritage?: (node: TSInterfaceHeritage) => void;
|
|
2710
|
+
"TSInterfaceHeritage:exit"?: (node: TSInterfaceHeritage) => void;
|
|
2711
|
+
TSIntersectionType?: (node: TSIntersectionType) => void;
|
|
2712
|
+
"TSIntersectionType:exit"?: (node: TSIntersectionType) => void;
|
|
2713
|
+
TSJSDocNonNullableType?: (node: JSDocNonNullableType) => void;
|
|
2714
|
+
"TSJSDocNonNullableType:exit"?: (node: JSDocNonNullableType) => void;
|
|
2715
|
+
TSJSDocNullableType?: (node: JSDocNullableType) => void;
|
|
2716
|
+
"TSJSDocNullableType:exit"?: (node: JSDocNullableType) => void;
|
|
2717
|
+
TSLiteralType?: (node: TSLiteralType) => void;
|
|
2718
|
+
"TSLiteralType:exit"?: (node: TSLiteralType) => void;
|
|
2719
|
+
TSMappedType?: (node: TSMappedType) => void;
|
|
2720
|
+
"TSMappedType:exit"?: (node: TSMappedType) => void;
|
|
2721
|
+
TSMethodSignature?: (node: TSMethodSignature) => void;
|
|
2722
|
+
"TSMethodSignature:exit"?: (node: TSMethodSignature) => void;
|
|
2723
|
+
TSModuleBlock?: (node: TSModuleBlock) => void;
|
|
2724
|
+
"TSModuleBlock:exit"?: (node: TSModuleBlock) => void;
|
|
2725
|
+
TSModuleDeclaration?: (node: TSModuleDeclaration | TSGlobalDeclaration) => void;
|
|
2726
|
+
"TSModuleDeclaration:exit"?: (node: TSModuleDeclaration | TSGlobalDeclaration) => void;
|
|
2727
|
+
TSNamedTupleMember?: (node: TSNamedTupleMember) => void;
|
|
2728
|
+
"TSNamedTupleMember:exit"?: (node: TSNamedTupleMember) => void;
|
|
2729
|
+
TSNamespaceExportDeclaration?: (node: TSNamespaceExportDeclaration) => void;
|
|
2730
|
+
"TSNamespaceExportDeclaration:exit"?: (node: TSNamespaceExportDeclaration) => void;
|
|
2731
|
+
TSNonNullExpression?: (node: TSNonNullExpression) => void;
|
|
2732
|
+
"TSNonNullExpression:exit"?: (node: TSNonNullExpression) => void;
|
|
2733
|
+
TSOptionalType?: (node: TSOptionalType) => void;
|
|
2734
|
+
"TSOptionalType:exit"?: (node: TSOptionalType) => void;
|
|
2735
|
+
TSParameterProperty?: (node: TSParameterProperty) => void;
|
|
2736
|
+
"TSParameterProperty:exit"?: (node: TSParameterProperty) => void;
|
|
2737
|
+
TSParenthesizedType?: (node: TSParenthesizedType) => void;
|
|
2738
|
+
"TSParenthesizedType:exit"?: (node: TSParenthesizedType) => void;
|
|
2739
|
+
TSPropertySignature?: (node: TSPropertySignature) => void;
|
|
2740
|
+
"TSPropertySignature:exit"?: (node: TSPropertySignature) => void;
|
|
2741
|
+
TSQualifiedName?: (node: TSQualifiedName) => void;
|
|
2742
|
+
"TSQualifiedName:exit"?: (node: TSQualifiedName) => void;
|
|
2743
|
+
TSRestType?: (node: TSRestType) => void;
|
|
2744
|
+
"TSRestType:exit"?: (node: TSRestType) => void;
|
|
2745
|
+
TSSatisfiesExpression?: (node: TSSatisfiesExpression) => void;
|
|
2746
|
+
"TSSatisfiesExpression:exit"?: (node: TSSatisfiesExpression) => void;
|
|
2747
|
+
TSTemplateLiteralType?: (node: TSTemplateLiteralType) => void;
|
|
2748
|
+
"TSTemplateLiteralType:exit"?: (node: TSTemplateLiteralType) => void;
|
|
2749
|
+
TSTupleType?: (node: TSTupleType) => void;
|
|
2750
|
+
"TSTupleType:exit"?: (node: TSTupleType) => void;
|
|
2751
|
+
TSTypeAliasDeclaration?: (node: TSTypeAliasDeclaration) => void;
|
|
2752
|
+
"TSTypeAliasDeclaration:exit"?: (node: TSTypeAliasDeclaration) => void;
|
|
2753
|
+
TSTypeAnnotation?: (node: TSTypeAnnotation) => void;
|
|
2754
|
+
"TSTypeAnnotation:exit"?: (node: TSTypeAnnotation) => void;
|
|
2755
|
+
TSTypeAssertion?: (node: TSTypeAssertion) => void;
|
|
2756
|
+
"TSTypeAssertion:exit"?: (node: TSTypeAssertion) => void;
|
|
2757
|
+
TSTypeLiteral?: (node: TSTypeLiteral) => void;
|
|
2758
|
+
"TSTypeLiteral:exit"?: (node: TSTypeLiteral) => void;
|
|
2759
|
+
TSTypeOperator?: (node: TSTypeOperator) => void;
|
|
2760
|
+
"TSTypeOperator:exit"?: (node: TSTypeOperator) => void;
|
|
2761
|
+
TSTypeParameter?: (node: TSTypeParameter) => void;
|
|
2762
|
+
"TSTypeParameter:exit"?: (node: TSTypeParameter) => void;
|
|
2763
|
+
TSTypeParameterDeclaration?: (node: TSTypeParameterDeclaration) => void;
|
|
2764
|
+
"TSTypeParameterDeclaration:exit"?: (node: TSTypeParameterDeclaration) => void;
|
|
2765
|
+
TSTypeParameterInstantiation?: (node: TSTypeParameterInstantiation) => void;
|
|
2766
|
+
"TSTypeParameterInstantiation:exit"?: (node: TSTypeParameterInstantiation) => void;
|
|
2767
|
+
TSTypePredicate?: (node: TSTypePredicate) => void;
|
|
2768
|
+
"TSTypePredicate:exit"?: (node: TSTypePredicate) => void;
|
|
2769
|
+
TSTypeQuery?: (node: TSTypeQuery) => void;
|
|
2770
|
+
"TSTypeQuery:exit"?: (node: TSTypeQuery) => void;
|
|
2771
|
+
TSTypeReference?: (node: TSTypeReference) => void;
|
|
2772
|
+
"TSTypeReference:exit"?: (node: TSTypeReference) => void;
|
|
2773
|
+
TSUnionType?: (node: TSUnionType) => void;
|
|
2774
|
+
"TSUnionType:exit"?: (node: TSUnionType) => void;
|
|
2523
2775
|
}
|
|
2524
|
-
type
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2776
|
+
type VisitorObject = { [K in keyof StrictVisitorObject]?: BivarianceHackHandler<Exclude<StrictVisitorObject[K], undefined>> | undefined; } & Record<string, BivarianceHackHandler<(node: Node$1) => void> | undefined>;
|
|
2777
|
+
//#endregion
|
|
2778
|
+
//#region src-js/plugins/types.d.ts
|
|
2779
|
+
type BeforeHook = () => boolean | void;
|
|
2780
|
+
type AfterHook = () => void;
|
|
2781
|
+
type VisitorWithHooks = VisitorObject & {
|
|
2782
|
+
before?: BeforeHook;
|
|
2783
|
+
after?: AfterHook;
|
|
2784
|
+
};
|
|
2785
|
+
interface Node extends Span {}
|
|
2786
|
+
type NodeOrToken = Node | TokenType | CommentType;
|
|
2787
|
+
declare namespace location_d_exports {
|
|
2788
|
+
export { LineColumn, Location, Range, Ranged, Span, computeLoc, debugAssertLinesIsInitialized, getLineColumnFromOffset, getLoc, getNodeByRangeIndex, getNodeLoc, getOffsetFromLineColumn, getRange, initLines, lineStartIndices, lines, resetLinesAndLocs };
|
|
2530
2789
|
}
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2790
|
+
/**
|
|
2791
|
+
* Range of source offsets.
|
|
2792
|
+
*/
|
|
2793
|
+
type Range = [number, number];
|
|
2794
|
+
/**
|
|
2795
|
+
* Interface for any type which has `range` field.
|
|
2796
|
+
*/
|
|
2797
|
+
interface Ranged {
|
|
2798
|
+
range: Range;
|
|
2536
2799
|
}
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2800
|
+
/**
|
|
2801
|
+
* Interface for any type which has location properties.
|
|
2802
|
+
*/
|
|
2803
|
+
interface Span extends Ranged {
|
|
2804
|
+
start: number;
|
|
2805
|
+
end: number;
|
|
2806
|
+
loc: Location;
|
|
2542
2807
|
}
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2808
|
+
/**
|
|
2809
|
+
* Source code location.
|
|
2810
|
+
*/
|
|
2811
|
+
interface Location {
|
|
2812
|
+
start: LineColumn;
|
|
2813
|
+
end: LineColumn;
|
|
2548
2814
|
}
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2815
|
+
/**
|
|
2816
|
+
* Line number + column number pair.
|
|
2817
|
+
* `line` is 1-indexed, `column` is 0-indexed.
|
|
2818
|
+
*/
|
|
2819
|
+
interface LineColumn {
|
|
2820
|
+
line: number;
|
|
2821
|
+
column: number;
|
|
2555
2822
|
}
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2823
|
+
declare const lines: string[];
|
|
2824
|
+
declare const lineStartIndices: number[];
|
|
2825
|
+
/**
|
|
2826
|
+
* Split source text into lines.
|
|
2827
|
+
*/
|
|
2828
|
+
declare function initLines(): void;
|
|
2829
|
+
/**
|
|
2830
|
+
* Debug assert that `lines` and `lineStartIndices` are initialized.
|
|
2831
|
+
* No-op in release build - TSDown will remove this function and all calls to it.
|
|
2832
|
+
*/
|
|
2833
|
+
declare function debugAssertLinesIsInitialized(): void;
|
|
2834
|
+
/**
|
|
2835
|
+
* Reset lines after file has been linted, to free memory.
|
|
2836
|
+
* Reset `Location` object pool.
|
|
2837
|
+
*/
|
|
2838
|
+
declare function resetLinesAndLocs(): void;
|
|
2839
|
+
/**
|
|
2840
|
+
* Convert a source text index into a (line, column) pair.
|
|
2841
|
+
* @param offset - The index of a character in a file.
|
|
2842
|
+
* @returns `{line, column}` location object with 1-indexed line and 0-indexed column.
|
|
2843
|
+
* @throws {TypeError|RangeError} If non-numeric `offset`, or `offset` out of range.
|
|
2844
|
+
*/
|
|
2845
|
+
declare function getLineColumnFromOffset(offset: number): LineColumn;
|
|
2846
|
+
/**
|
|
2847
|
+
* Convert a `{ line, column }` pair into a range index.
|
|
2848
|
+
* @param loc - A line/column location.
|
|
2849
|
+
* @returns The character index of the location in the file.
|
|
2850
|
+
* @throws {TypeError|RangeError} If `loc` is not an object with a numeric `line` and `column`,
|
|
2851
|
+
* or if the `line` is less than or equal to zero, or the line or column is out of the expected range.
|
|
2852
|
+
*/
|
|
2853
|
+
declare function getOffsetFromLineColumn(loc: LineColumn): number;
|
|
2854
|
+
/**
|
|
2855
|
+
* Get the range of the given node or token.
|
|
2856
|
+
* @param nodeOrToken - Node or token to get the range of
|
|
2857
|
+
* @returns Range of the node or token
|
|
2858
|
+
*/
|
|
2859
|
+
declare function getRange(nodeOrToken: NodeOrToken): Range;
|
|
2860
|
+
/**
|
|
2861
|
+
* Get the location of the given node or token.
|
|
2862
|
+
* @param nodeOrToken - Node or token to get the location of
|
|
2863
|
+
* @returns Location of the node or token
|
|
2864
|
+
*/
|
|
2865
|
+
declare function getLoc(nodeOrToken: NodeOrToken): Location;
|
|
2866
|
+
/**
|
|
2867
|
+
* Calculate the `Location` for an AST node, and cache it on the node.
|
|
2868
|
+
*
|
|
2869
|
+
* Used in `loc` getter on AST nodes (not tokens or comments - they use their own caching
|
|
2870
|
+
* via `Token` / `Comment` class private fields).
|
|
2871
|
+
*
|
|
2872
|
+
* Defines a `loc` property on the node with the calculated `Location`, so accessing `loc` twice on same node
|
|
2873
|
+
* results in the same object each time.
|
|
2874
|
+
*
|
|
2875
|
+
* For internal use only.
|
|
2876
|
+
*
|
|
2877
|
+
* @param node - AST node
|
|
2878
|
+
* @returns Location
|
|
2879
|
+
*/
|
|
2880
|
+
declare function getNodeLoc(node: Node): Location;
|
|
2881
|
+
/**
|
|
2882
|
+
* Compute a `Location` from `start` and `end` source offsets.
|
|
2883
|
+
*
|
|
2884
|
+
* Returns a recycled `Location` object from the pool when possible, allocating only during warmup.
|
|
2885
|
+
* Initializes `lines` and `lineStartIndices` tables if they haven't been already.
|
|
2886
|
+
*
|
|
2887
|
+
* @param start - Start offset
|
|
2888
|
+
* @param end - End offset
|
|
2889
|
+
* @returns Location
|
|
2890
|
+
*/
|
|
2891
|
+
declare function computeLoc(start: number, end: number): Location;
|
|
2892
|
+
/**
|
|
2893
|
+
* Get the deepest node containing a range index.
|
|
2894
|
+
* @param offset - Range index of the desired node
|
|
2895
|
+
* @returns The node if found, or `null` if not found
|
|
2896
|
+
*/
|
|
2897
|
+
declare function getNodeByRangeIndex(offset: number): Node$1 | null;
|
|
2898
|
+
//#endregion
|
|
2899
|
+
//#region src-js/plugins/fix.d.ts
|
|
2900
|
+
type FixFn = (fixer: Fixer) => Fix | Array<Fix | null | undefined> | IterableIterator<Fix | null | undefined> | null | undefined;
|
|
2901
|
+
/**
|
|
2902
|
+
* Fix, as returned by `fix` function.
|
|
2903
|
+
*
|
|
2904
|
+
* `range` offsets are relative to start of the source text.
|
|
2905
|
+
* When the file has a BOM, they are relative to the start of the source text *without* the BOM.
|
|
2906
|
+
*
|
|
2907
|
+
* To represent a position *before* a BOM, -1 is used to mean "before the BOM".
|
|
2908
|
+
* ESLint's `unicode-bom` rule produces a fix `{ range: [-1, 0], text: "" }` to remove a BOM.
|
|
2909
|
+
*/
|
|
2910
|
+
interface Fix {
|
|
2911
|
+
range: Range;
|
|
2912
|
+
text: string;
|
|
2561
2913
|
}
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2914
|
+
declare const FIXER: Readonly<{
|
|
2915
|
+
insertTextBefore(nodeOrToken: Ranged, text: string): Fix;
|
|
2916
|
+
insertTextBeforeRange(range: Range, text: string): Fix;
|
|
2917
|
+
insertTextAfter(nodeOrToken: Ranged, text: string): Fix;
|
|
2918
|
+
insertTextAfterRange(range: Range, text: string): Fix;
|
|
2919
|
+
remove(nodeOrToken: Ranged): Fix;
|
|
2920
|
+
removeRange(range: Range): Fix;
|
|
2921
|
+
replaceText(nodeOrToken: Ranged, text: string): Fix;
|
|
2922
|
+
replaceTextRange(range: Range, text: string): Fix;
|
|
2923
|
+
}>;
|
|
2924
|
+
type Fixer = typeof FIXER;
|
|
2925
|
+
//#endregion
|
|
2926
|
+
//#region src-js/plugins/report.d.ts
|
|
2927
|
+
/**
|
|
2928
|
+
* Diagnostic object.
|
|
2929
|
+
* Passed to `Context#report()`.
|
|
2930
|
+
*
|
|
2931
|
+
* - Either `message` or `messageId` property must be provided.
|
|
2932
|
+
* - Either `node` or `loc` property must be provided.
|
|
2933
|
+
*/
|
|
2934
|
+
type Diagnostic = RequireAtLeastOne<RequireAtLeastOne<DiagnosticBase, "node" | "loc">, "message" | "messageId">;
|
|
2935
|
+
interface DiagnosticBase {
|
|
2936
|
+
message?: string | null | undefined;
|
|
2937
|
+
messageId?: string | null | undefined;
|
|
2938
|
+
node?: Ranged;
|
|
2939
|
+
loc?: LocationWithOptionalEnd | LineColumn;
|
|
2940
|
+
data?: DiagnosticData | null | undefined;
|
|
2941
|
+
fix?: FixFn;
|
|
2942
|
+
suggest?: Suggestion[] | null | undefined;
|
|
2566
2943
|
}
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2944
|
+
/**
|
|
2945
|
+
* Location with `end` property optional.
|
|
2946
|
+
*/
|
|
2947
|
+
interface LocationWithOptionalEnd {
|
|
2948
|
+
start: LineColumn;
|
|
2949
|
+
end?: LineColumn | null | undefined;
|
|
2571
2950
|
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2951
|
+
/**
|
|
2952
|
+
* Data to interpolate into a diagnostic message.
|
|
2953
|
+
*/
|
|
2954
|
+
type DiagnosticData = Record<string, string | number | boolean | bigint | null | undefined>;
|
|
2955
|
+
/**
|
|
2956
|
+
* Suggested fix.
|
|
2957
|
+
*/
|
|
2958
|
+
type Suggestion = RequireAtLeastOne<SuggestionBase, "desc" | "messageId">;
|
|
2959
|
+
interface SuggestionBase {
|
|
2960
|
+
desc?: string;
|
|
2961
|
+
messageId?: string;
|
|
2962
|
+
data?: DiagnosticData | null | undefined;
|
|
2963
|
+
fix: FixFn;
|
|
2576
2964
|
}
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2965
|
+
//#endregion
|
|
2966
|
+
//#region src-js/plugins/settings.d.ts
|
|
2967
|
+
/**
|
|
2968
|
+
* Settings for the file being linted.
|
|
2969
|
+
*
|
|
2970
|
+
* Settings are deserialized from JSON, so can only contain JSON-compatible values.
|
|
2971
|
+
*/
|
|
2972
|
+
type Settings = JsonObject;
|
|
2973
|
+
declare namespace comments_methods_d_exports {
|
|
2974
|
+
export { commentsExistBetween, getAllComments, getCommentsAfter, getCommentsBefore, getCommentsInside, getJSDocComment };
|
|
2581
2975
|
}
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2976
|
+
/**
|
|
2977
|
+
* Retrieve an array containing all comments in the source code.
|
|
2978
|
+
* @returns Array of `Comment`s in order they appear in source.
|
|
2979
|
+
*/
|
|
2980
|
+
declare function getAllComments(): CommentType[];
|
|
2981
|
+
/**
|
|
2982
|
+
* Get all comments directly before the given node or token.
|
|
2983
|
+
*
|
|
2984
|
+
* "Directly before" means only comments before this node, and after the preceding token.
|
|
2985
|
+
*
|
|
2986
|
+
* ```js
|
|
2987
|
+
* // Define `x`
|
|
2988
|
+
* const x = 1;
|
|
2989
|
+
* // Define `y`
|
|
2990
|
+
* const y = 2;
|
|
2991
|
+
* ```
|
|
2992
|
+
*
|
|
2993
|
+
* `sourceCode.getCommentsBefore(varDeclY)` will only return "Define `y`" comment, not also "Define `x`".
|
|
2994
|
+
*
|
|
2995
|
+
* @param nodeOrToken - The AST node or token to check for adjacent comment tokens.
|
|
2996
|
+
* @returns Array of `Comment`s in occurrence order.
|
|
2997
|
+
*/
|
|
2998
|
+
declare function getCommentsBefore(nodeOrToken: NodeOrToken): CommentType[];
|
|
2999
|
+
/**
|
|
3000
|
+
* Get all comment tokens directly after the given node or token.
|
|
3001
|
+
*
|
|
3002
|
+
* "Directly after" means only comments between end of this node, and the next token following it.
|
|
3003
|
+
*
|
|
3004
|
+
* ```js
|
|
3005
|
+
* const x = 1;
|
|
3006
|
+
* // Define `y`
|
|
3007
|
+
* const y = 2;
|
|
3008
|
+
* // Define `z`
|
|
3009
|
+
* const z = 3;
|
|
3010
|
+
* ```
|
|
3011
|
+
*
|
|
3012
|
+
* `sourceCode.getCommentsAfter(varDeclX)` will only return "Define `y`" comment, not also "Define `z`".
|
|
3013
|
+
*
|
|
3014
|
+
* @param nodeOrToken - The AST node or token to check for adjacent comment tokens.
|
|
3015
|
+
* @returns Array of `Comment`s in occurrence order.
|
|
3016
|
+
*/
|
|
3017
|
+
declare function getCommentsAfter(nodeOrToken: NodeOrToken): CommentType[];
|
|
3018
|
+
/**
|
|
3019
|
+
* Get all comment tokens inside the given node.
|
|
3020
|
+
* @param node - The AST node to get the comments for.
|
|
3021
|
+
* @returns Array of `Comment`s in occurrence order.
|
|
3022
|
+
*/
|
|
3023
|
+
declare function getCommentsInside(node: Node): CommentType[];
|
|
3024
|
+
/**
|
|
3025
|
+
* Check whether any comments exist or not between the given 2 nodes.
|
|
3026
|
+
* @param nodeOrToken1 - Start node/token.
|
|
3027
|
+
* @param nodeOrToken2 - End node/token.
|
|
3028
|
+
* @returns `true` if one or more comments exist between the two.
|
|
3029
|
+
*/
|
|
3030
|
+
declare function commentsExistBetween(nodeOrToken1: NodeOrToken, nodeOrToken2: NodeOrToken): boolean;
|
|
3031
|
+
/**
|
|
3032
|
+
* Retrieve the JSDoc comment for a given node.
|
|
3033
|
+
*
|
|
3034
|
+
* @deprecated
|
|
3035
|
+
*
|
|
3036
|
+
* @param node - The AST node to get the comment for.
|
|
3037
|
+
* @returns The JSDoc comment for the given node, or `null` if not found.
|
|
3038
|
+
*/
|
|
3039
|
+
declare function getJSDocComment(node: Node): CommentType | null;
|
|
3040
|
+
declare namespace directives_d_exports {
|
|
3041
|
+
export { getDisableDirectives };
|
|
2587
3042
|
}
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
postfix: boolean;
|
|
2593
|
-
parent: Node;
|
|
3043
|
+
interface Problem {
|
|
3044
|
+
ruleId: string | null;
|
|
3045
|
+
message: string;
|
|
3046
|
+
loc: Location;
|
|
2594
3047
|
}
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
3048
|
+
type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
|
|
3049
|
+
interface Directive {
|
|
3050
|
+
type: DirectiveType;
|
|
3051
|
+
node: CommentType;
|
|
3052
|
+
value: string;
|
|
3053
|
+
justification: string;
|
|
2600
3054
|
}
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
3055
|
+
declare function getDisableDirectives(): {
|
|
3056
|
+
problems: Problem[];
|
|
3057
|
+
directives: Directive[];
|
|
3058
|
+
};
|
|
3059
|
+
declare namespace scope_d_exports {
|
|
3060
|
+
export { Definition, DefinitionType, Reference, SCOPE_MANAGER, Scope, ScopeManager, ScopeType, Variable, getDeclaredVariables, getScope, isGlobalReference, markVariableAsUsed, resetScopeManager };
|
|
2604
3061
|
}
|
|
2605
|
-
type ModuleKind = "script" | "module" | "commonjs";
|
|
2606
|
-
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
|
|
2607
|
-
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
|
|
2608
|
-
type LogicalOperator = "||" | "&&" | "??";
|
|
2609
|
-
type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
2610
|
-
type UpdateOperator = "++" | "--";
|
|
2611
|
-
type Node = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive$1 | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
|
|
2612
|
-
//#endregion
|
|
2613
|
-
//#region src-js/plugins/scope.d.ts
|
|
2614
3062
|
interface Scope {
|
|
2615
3063
|
type: ScopeType;
|
|
2616
3064
|
isStrict: boolean;
|
|
2617
3065
|
upper: Scope | null;
|
|
2618
3066
|
childScopes: Scope[];
|
|
2619
3067
|
variableScope: Scope;
|
|
2620
|
-
block: Node;
|
|
3068
|
+
block: Node$1;
|
|
2621
3069
|
variables: Variable[];
|
|
2622
3070
|
set: Map<string, Variable>;
|
|
2623
3071
|
references: Reference[];
|
|
@@ -2651,30 +3099,62 @@ interface Reference {
|
|
|
2651
3099
|
interface Definition {
|
|
2652
3100
|
type: DefinitionType;
|
|
2653
3101
|
name: Identifier;
|
|
2654
|
-
node: Node;
|
|
2655
|
-
parent: Node | null;
|
|
3102
|
+
node: Node$1;
|
|
3103
|
+
parent: Node$1 | null;
|
|
2656
3104
|
}
|
|
2657
3105
|
type DefinitionType = "CatchClause" | "ClassName" | "FunctionName" | "ImplicitGlobalVariable" | "ImportBinding" | "Parameter" | "Variable";
|
|
2658
3106
|
type Identifier = IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName;
|
|
3107
|
+
/**
|
|
3108
|
+
* Discard TS-ESLint `ScopeManager`, to free memory.
|
|
3109
|
+
*/
|
|
3110
|
+
declare function resetScopeManager(): void;
|
|
3111
|
+
declare const SCOPE_MANAGER: Readonly<{
|
|
3112
|
+
/**
|
|
3113
|
+
* All scopes.
|
|
3114
|
+
*/
|
|
3115
|
+
readonly scopes: Scope[];
|
|
3116
|
+
/**
|
|
3117
|
+
* The root scope.
|
|
3118
|
+
*/
|
|
3119
|
+
readonly globalScope: Scope | null;
|
|
3120
|
+
/**
|
|
3121
|
+
* Get the variables that a given AST node defines.
|
|
3122
|
+
* The returned variables' `def[].node` / `def[].parent` property is the node.
|
|
3123
|
+
* If the node does not define any variable, this returns an empty array.
|
|
3124
|
+
* @param node AST node to get variables of.
|
|
3125
|
+
*/
|
|
3126
|
+
getDeclaredVariables(node: Node$1): Variable[];
|
|
3127
|
+
/**
|
|
3128
|
+
* Get the scope of a given AST node. The returned scope's `block` property is the node.
|
|
3129
|
+
* This method never returns `function-expression-name` scope.
|
|
3130
|
+
* If the node does not have a scope, returns `null`.
|
|
3131
|
+
*
|
|
3132
|
+
* @param node An AST node to get their scope.
|
|
3133
|
+
* @param inner If the node has multiple scopes, this returns the outermost scope normally.
|
|
3134
|
+
* If `inner` is `true` then this returns the innermost scope.
|
|
3135
|
+
*/
|
|
3136
|
+
acquire(node: Node$1, inner?: boolean): Scope | null;
|
|
3137
|
+
}>;
|
|
3138
|
+
type ScopeManager = typeof SCOPE_MANAGER;
|
|
2659
3139
|
/**
|
|
2660
3140
|
* Determine whether the given identifier node is a reference to a global variable.
|
|
2661
3141
|
* @param node - `Identifier` node to check.
|
|
2662
3142
|
* @returns `true` if the identifier is a reference to a global variable.
|
|
2663
3143
|
*/
|
|
2664
|
-
declare function isGlobalReference(node: Node): boolean;
|
|
3144
|
+
declare function isGlobalReference(node: Node$1): boolean;
|
|
2665
3145
|
/**
|
|
2666
3146
|
* Get the variables that `node` defines.
|
|
2667
3147
|
* This is a convenience method that passes through to the same method on the `ScopeManager`.
|
|
2668
3148
|
* @param node - The node for which the variables are obtained.
|
|
2669
3149
|
* @returns An array of variable nodes representing the variables that `node` defines.
|
|
2670
3150
|
*/
|
|
2671
|
-
declare function getDeclaredVariables(node: Node): Variable[];
|
|
3151
|
+
declare function getDeclaredVariables(node: Node$1): Variable[];
|
|
2672
3152
|
/**
|
|
2673
3153
|
* Get the scope for the given node.
|
|
2674
3154
|
* @param node - The node to get the scope of.
|
|
2675
3155
|
* @returns The scope information for this node.
|
|
2676
3156
|
*/
|
|
2677
|
-
declare function getScope(node: Node): Scope;
|
|
3157
|
+
declare function getScope(node: Node$1): Scope;
|
|
2678
3158
|
/**
|
|
2679
3159
|
* Marks as used a variable with the given name in a scope indicated by the given reference node.
|
|
2680
3160
|
*
|
|
@@ -2687,78 +3167,13 @@ declare function getScope(node: Node): Scope;
|
|
|
2687
3167
|
* @param refNode - Reference node. Defaults to `Program` node if not provided.
|
|
2688
3168
|
* @returns `true` if a variable with the given name was found and marked as used, otherwise `false`
|
|
2689
3169
|
*/
|
|
2690
|
-
declare function markVariableAsUsed(name: string, refNode?: Node): boolean;
|
|
2691
|
-
//#endregion
|
|
2692
|
-
//#region src-js/plugins/comments_methods.d.ts
|
|
2693
|
-
/**
|
|
2694
|
-
* Retrieve an array containing all comments in the source code.
|
|
2695
|
-
* @returns Array of `Comment`s in order they appear in source.
|
|
2696
|
-
*/
|
|
2697
|
-
declare function getAllComments(): CommentType[];
|
|
2698
|
-
/**
|
|
2699
|
-
* Get all comments directly before the given node or token.
|
|
2700
|
-
*
|
|
2701
|
-
* "Directly before" means only comments before this node, and after the preceding token.
|
|
2702
|
-
*
|
|
2703
|
-
* ```js
|
|
2704
|
-
* // Define `x`
|
|
2705
|
-
* const x = 1;
|
|
2706
|
-
* // Define `y`
|
|
2707
|
-
* const y = 2;
|
|
2708
|
-
* ```
|
|
2709
|
-
*
|
|
2710
|
-
* `sourceCode.getCommentsBefore(varDeclY)` will only return "Define `y`" comment, not also "Define `x`".
|
|
2711
|
-
*
|
|
2712
|
-
* @param nodeOrToken - The AST node or token to check for adjacent comment tokens.
|
|
2713
|
-
* @returns Array of `Comment`s in occurrence order.
|
|
2714
|
-
*/
|
|
2715
|
-
declare function getCommentsBefore(nodeOrToken: NodeOrToken): CommentType[];
|
|
2716
|
-
/**
|
|
2717
|
-
* Get all comment tokens directly after the given node or token.
|
|
2718
|
-
*
|
|
2719
|
-
* "Directly after" means only comments between end of this node, and the next token following it.
|
|
2720
|
-
*
|
|
2721
|
-
* ```js
|
|
2722
|
-
* const x = 1;
|
|
2723
|
-
* // Define `y`
|
|
2724
|
-
* const y = 2;
|
|
2725
|
-
* // Define `z`
|
|
2726
|
-
* const z = 3;
|
|
2727
|
-
* ```
|
|
2728
|
-
*
|
|
2729
|
-
* `sourceCode.getCommentsAfter(varDeclX)` will only return "Define `y`" comment, not also "Define `z`".
|
|
2730
|
-
*
|
|
2731
|
-
* @param nodeOrToken - The AST node or token to check for adjacent comment tokens.
|
|
2732
|
-
* @returns Array of `Comment`s in occurrence order.
|
|
2733
|
-
*/
|
|
2734
|
-
declare function getCommentsAfter(nodeOrToken: NodeOrToken): CommentType[];
|
|
2735
|
-
/**
|
|
2736
|
-
* Get all comment tokens inside the given node.
|
|
2737
|
-
* @param node - The AST node to get the comments for.
|
|
2738
|
-
* @returns Array of `Comment`s in occurrence order.
|
|
2739
|
-
*/
|
|
2740
|
-
declare function getCommentsInside(node: Node$1): CommentType[];
|
|
2741
|
-
/**
|
|
2742
|
-
* Check whether any comments exist or not between the given 2 nodes.
|
|
2743
|
-
* @param nodeOrToken1 - Start node/token.
|
|
2744
|
-
* @param nodeOrToken2 - End node/token.
|
|
2745
|
-
* @returns `true` if one or more comments exist between the two.
|
|
2746
|
-
*/
|
|
2747
|
-
declare function commentsExistBetween(nodeOrToken1: NodeOrToken, nodeOrToken2: NodeOrToken): boolean;
|
|
2748
|
-
/**
|
|
2749
|
-
* Retrieve the JSDoc comment for a given node.
|
|
2750
|
-
*
|
|
2751
|
-
* @deprecated
|
|
2752
|
-
*
|
|
2753
|
-
* @param node - The AST node to get the comment for.
|
|
2754
|
-
* @returns The JSDoc comment for the given node, or `null` if not found.
|
|
2755
|
-
*/
|
|
2756
|
-
declare function getJSDocComment(node: Node$1): CommentType | null;
|
|
3170
|
+
declare function markVariableAsUsed(name: string, refNode?: Node$1): boolean;
|
|
2757
3171
|
//#endregion
|
|
2758
3172
|
//#region src-js/plugins/tokens_and_comments.d.ts
|
|
2759
3173
|
type TokenOrComment = TokenType | CommentType;
|
|
2760
|
-
|
|
2761
|
-
|
|
3174
|
+
declare namespace tokens_methods_d_exports {
|
|
3175
|
+
export { CountOptions, FilterFn, RangeOptions, SkipOptions, firstTokenAtOrAfter, getFirstToken, getFirstTokenBetween, getFirstTokens, getFirstTokensBetween, getLastToken, getLastTokenBetween, getLastTokens, getLastTokensBetween, getTokenAfter, getTokenBefore, getTokenByRangeStart, getTokenOrCommentAfter, getTokenOrCommentBefore, getTokens, getTokensAfter, getTokensBefore, getTokensBetween, isSpaceBetween, isSpaceBetweenTokens };
|
|
3176
|
+
}
|
|
2762
3177
|
/**
|
|
2763
3178
|
* Options for various `SourceCode` methods e.g. `getFirstToken`.
|
|
2764
3179
|
*/
|
|
@@ -2817,7 +3232,7 @@ type TokenResult<Options> = MayIncludeComments<Options> extends true ? TokenOrCo
|
|
|
2817
3232
|
* @param afterCount? - The number of tokens after the node to retrieve.
|
|
2818
3233
|
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2819
3234
|
*/
|
|
2820
|
-
declare function getTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node
|
|
3235
|
+
declare function getTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node, countOptions?: Options, afterCount?: number | null): TokenResult<Options>[];
|
|
2821
3236
|
/**
|
|
2822
3237
|
* Get the first token of the given node.
|
|
2823
3238
|
* @param node - The AST node.
|
|
@@ -2826,7 +3241,7 @@ declare function getTokens<Options extends CountOptions | number | FilterFn | nu
|
|
|
2826
3241
|
* If is a function, equivalent to `{ filter: fn }`.
|
|
2827
3242
|
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2828
3243
|
*/
|
|
2829
|
-
declare function getFirstToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node
|
|
3244
|
+
declare function getFirstToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node, skipOptions?: Options): TokenResult<Options> | null;
|
|
2830
3245
|
/**
|
|
2831
3246
|
* Get the first tokens of the given node.
|
|
2832
3247
|
* @param node - The AST node.
|
|
@@ -2835,506 +3250,197 @@ declare function getFirstToken<Options extends SkipOptions | number | FilterFn |
|
|
|
2835
3250
|
* If is a function, equivalent to `{ filter: fn }`.
|
|
2836
3251
|
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2837
3252
|
*/
|
|
2838
|
-
declare function getFirstTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node
|
|
2839
|
-
/**
|
|
2840
|
-
* Get the last token of the given node.
|
|
2841
|
-
* @param node - The AST node.
|
|
2842
|
-
* @param skipOptions? - Options object.
|
|
2843
|
-
* If is a number, equivalent to `{ skip: n }`.
|
|
2844
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2845
|
-
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2846
|
-
*/
|
|
2847
|
-
declare function getLastToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node$1, skipOptions?: Options): TokenResult<Options> | null;
|
|
2848
|
-
/**
|
|
2849
|
-
* Get the last tokens of the given node.
|
|
2850
|
-
* @param node - The AST node.
|
|
2851
|
-
* @param countOptions? - Options object.
|
|
2852
|
-
* If is a number, equivalent to `{ count: n }`.
|
|
2853
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2854
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2855
|
-
*/
|
|
2856
|
-
declare function getLastTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node$1, countOptions?: Options): TokenResult<Options>[];
|
|
2857
|
-
/**
|
|
2858
|
-
* Get the token that precedes a given node or token.
|
|
2859
|
-
* @param nodeOrToken - The AST node or token.
|
|
2860
|
-
* @param skipOptions? - Options object.
|
|
2861
|
-
* If is a number, equivalent to `{ skip: n }`.
|
|
2862
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2863
|
-
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2864
|
-
*/
|
|
2865
|
-
declare function getTokenBefore<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
2866
|
-
/**
|
|
2867
|
-
* Get the token that precedes a given node or token.
|
|
2868
|
-
*
|
|
2869
|
-
* @deprecated Use `sourceCode.getTokenBefore` with `includeComments: true` instead.
|
|
2870
|
-
*
|
|
2871
|
-
* @param nodeOrToken The AST node or token.
|
|
2872
|
-
* @param skip - Number of tokens to skip.
|
|
2873
|
-
* @returns `TokenOrComment | null`.
|
|
2874
|
-
*/
|
|
2875
|
-
declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
|
|
2876
|
-
/**
|
|
2877
|
-
* Get the tokens that precede a given node or token.
|
|
2878
|
-
* @param nodeOrToken - The AST node or token.
|
|
2879
|
-
* @param countOptions? - Options object.
|
|
2880
|
-
* If is a number, equivalent to `{ count: n }`.
|
|
2881
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2882
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2883
|
-
*/
|
|
2884
|
-
declare function getTokensBefore<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
2885
|
-
/**
|
|
2886
|
-
* Get the token that follows a given node or token.
|
|
2887
|
-
* @param nodeOrToken - The AST node or token.
|
|
2888
|
-
* @param skipOptions? - Options object.
|
|
2889
|
-
* If is a number, equivalent to `{ skip: n }`.
|
|
2890
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2891
|
-
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2892
|
-
*/
|
|
2893
|
-
declare function getTokenAfter<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
2894
|
-
/**
|
|
2895
|
-
* Get the token that follows a given node or token.
|
|
2896
|
-
*
|
|
2897
|
-
* @deprecated Use `sourceCode.getTokenAfter` with `includeComments: true` instead.
|
|
2898
|
-
*
|
|
2899
|
-
* @param nodeOrToken The AST node or token.
|
|
2900
|
-
* @param skip - Number of tokens to skip.
|
|
2901
|
-
* @returns `TokenOrComment | null`.
|
|
2902
|
-
*/
|
|
2903
|
-
declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
|
|
2904
|
-
/**
|
|
2905
|
-
* Get the tokens that follow a given node or token.
|
|
2906
|
-
* @param nodeOrToken - The AST node or token.
|
|
2907
|
-
* @param countOptions? - Options object.
|
|
2908
|
-
* If is a number, equivalent to `{ count: n }`.
|
|
2909
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2910
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2911
|
-
*/
|
|
2912
|
-
declare function getTokensAfter<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
2913
|
-
/**
|
|
2914
|
-
* Get all of the tokens between two non-overlapping nodes.
|
|
2915
|
-
* @param left - Node or token before the desired token range.
|
|
2916
|
-
* @param right - Node or token after the desired token range.
|
|
2917
|
-
* @param countOptions? - Options object. If is a function, equivalent to `{ filter: fn }`.
|
|
2918
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2919
|
-
*/
|
|
2920
|
-
/**
|
|
2921
|
-
* Get all of the tokens between two non-overlapping nodes.
|
|
2922
|
-
* @param left - Node or token before the desired token range.
|
|
2923
|
-
* @param right - Node or token after the desired token range.
|
|
2924
|
-
* @param padding - Number of extra tokens on either side of center.
|
|
2925
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2926
|
-
*/
|
|
2927
|
-
declare function getTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
2928
|
-
/**
|
|
2929
|
-
* Get the first token between two non-overlapping nodes.
|
|
2930
|
-
* @param left - Node or token before the desired token range.
|
|
2931
|
-
* @param right - Node or token after the desired token range.
|
|
2932
|
-
* @param skipOptions? - Options object.
|
|
2933
|
-
* If is a number, equivalent to `{ skip: n }`.
|
|
2934
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2935
|
-
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2936
|
-
*/
|
|
2937
|
-
declare function getFirstTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
2938
|
-
/**
|
|
2939
|
-
* Get the first tokens between two non-overlapping nodes.
|
|
2940
|
-
* @param left - Node or token before the desired token range.
|
|
2941
|
-
* @param right - Node or token after the desired token range.
|
|
2942
|
-
* @param countOptions? - Options object.
|
|
2943
|
-
* If is a number, equivalent to `{ count: n }`.
|
|
2944
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2945
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2946
|
-
*/
|
|
2947
|
-
declare function getFirstTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
2948
|
-
/**
|
|
2949
|
-
* Get the last token between two non-overlapping nodes.
|
|
2950
|
-
* @param left - Node or token before the desired token range.
|
|
2951
|
-
* @param right - Node or token after the desired token range.
|
|
2952
|
-
* @param skipOptions? - Options object.
|
|
2953
|
-
* If is a number, equivalent to `{ skip: n }`.
|
|
2954
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2955
|
-
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2956
|
-
*/
|
|
2957
|
-
declare function getLastTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
2958
|
-
/**
|
|
2959
|
-
* Get the last tokens between two non-overlapping nodes.
|
|
2960
|
-
* @param left - Node or token before the desired token range.
|
|
2961
|
-
* @param right - Node or token after the desired token range.
|
|
2962
|
-
* @param countOptions? - Options object.
|
|
2963
|
-
* If is a number, equivalent to `{ count: n }`.
|
|
2964
|
-
* If is a function, equivalent to `{ filter: fn }`.
|
|
2965
|
-
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
2966
|
-
*/
|
|
2967
|
-
declare function getLastTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
2968
|
-
/**
|
|
2969
|
-
* Get the token starting at the specified index.
|
|
2970
|
-
* @param offset - Start offset of the token.
|
|
2971
|
-
* @param rangeOptions - Options object.
|
|
2972
|
-
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
2973
|
-
*/
|
|
2974
|
-
declare function getTokenByRangeStart<Options extends RangeOptions | null | undefined>(offset: number, rangeOptions?: Options): TokenResult<Options> | null;
|
|
2975
|
-
/**
|
|
2976
|
-
* Determine if two nodes or tokens have at least one whitespace character between them.
|
|
2977
|
-
* Order does not matter.
|
|
2978
|
-
*
|
|
2979
|
-
* Returns `false` if the given nodes or tokens overlap.
|
|
2980
|
-
*
|
|
2981
|
-
* Checks for whitespace *between tokens*, not including whitespace *inside tokens*.
|
|
2982
|
-
* e.g. Returns `false` for `isSpaceBetween(x, y)` in `x+" "+y`.
|
|
2983
|
-
*
|
|
2984
|
-
* @param first - The first node or token to check between.
|
|
2985
|
-
* @param second - The second node or token to check between.
|
|
2986
|
-
* @returns `true` if there is a whitespace character between
|
|
2987
|
-
* any of the tokens found between the two given nodes or tokens.
|
|
2988
|
-
*/
|
|
2989
|
-
declare function isSpaceBetween(first: NodeOrToken, second: NodeOrToken): boolean;
|
|
2990
|
-
/**
|
|
2991
|
-
* Determine if two nodes or tokens have at least one whitespace character between them.
|
|
2992
|
-
* Order does not matter.
|
|
2993
|
-
*
|
|
2994
|
-
* Returns `false` if the given nodes or tokens overlap.
|
|
2995
|
-
*
|
|
2996
|
-
* Checks for whitespace *between tokens*, not including whitespace *inside tokens*.
|
|
2997
|
-
* e.g. Returns `false` for `isSpaceBetween(x, y)` in `x+" "+y`.
|
|
2998
|
-
*
|
|
2999
|
-
* Unlike `SourceCode#isSpaceBetween`, this function does return `true` if there is a `JSText` token between the two
|
|
3000
|
-
* input tokens, and it contains whitespace.
|
|
3001
|
-
* e.g. Returns `true` for `isSpaceBetweenTokens(x, slash)` in `<X>a b</X>`.
|
|
3002
|
-
*
|
|
3003
|
-
* @deprecated Use `sourceCode.isSpaceBetween` instead.
|
|
3004
|
-
*
|
|
3005
|
-
* @param first - The first node or token to check between.
|
|
3006
|
-
* @param second - The second node or token to check between.
|
|
3007
|
-
* @returns `true` if there is a whitespace character between
|
|
3008
|
-
* any of the tokens found between the two given nodes or tokens.
|
|
3009
|
-
*/
|
|
3010
|
-
declare function isSpaceBetweenTokens(first: NodeOrToken, second: NodeOrToken): boolean;
|
|
3011
|
-
//#endregion
|
|
3012
|
-
//#region src-js/plugins/directives.d.ts
|
|
3013
|
-
interface Problem {
|
|
3014
|
-
ruleId: string | null;
|
|
3015
|
-
message: string;
|
|
3016
|
-
loc: Location;
|
|
3017
|
-
}
|
|
3018
|
-
type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
|
|
3019
|
-
interface Directive {
|
|
3020
|
-
type: DirectiveType;
|
|
3021
|
-
node: CommentType;
|
|
3022
|
-
value: string;
|
|
3023
|
-
justification: string;
|
|
3024
|
-
}
|
|
3025
|
-
declare function getDisableDirectives(): {
|
|
3026
|
-
problems: Problem[];
|
|
3027
|
-
directives: Directive[];
|
|
3028
|
-
};
|
|
3029
|
-
//#endregion
|
|
3030
|
-
//#region src-js/plugins/json.d.ts
|
|
3253
|
+
declare function getFirstTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node, countOptions?: Options): TokenResult<Options>[];
|
|
3031
3254
|
/**
|
|
3032
|
-
*
|
|
3255
|
+
* Get the last token of the given node.
|
|
3256
|
+
* @param node - The AST node.
|
|
3257
|
+
* @param skipOptions? - Options object.
|
|
3258
|
+
* If is a number, equivalent to `{ skip: n }`.
|
|
3259
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3260
|
+
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
3033
3261
|
*/
|
|
3034
|
-
|
|
3262
|
+
declare function getLastToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node, skipOptions?: Options): TokenResult<Options> | null;
|
|
3035
3263
|
/**
|
|
3036
|
-
*
|
|
3264
|
+
* Get the last tokens of the given node.
|
|
3265
|
+
* @param node - The AST node.
|
|
3266
|
+
* @param countOptions? - Options object.
|
|
3267
|
+
* If is a number, equivalent to `{ count: n }`.
|
|
3268
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3269
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3037
3270
|
*/
|
|
3038
|
-
|
|
3039
|
-
[key: string]: JsonValue;
|
|
3040
|
-
};
|
|
3041
|
-
//#endregion
|
|
3042
|
-
//#region src-js/plugins/globals.d.ts
|
|
3271
|
+
declare function getLastTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node, countOptions?: Options): TokenResult<Options>[];
|
|
3043
3272
|
/**
|
|
3044
|
-
*
|
|
3045
|
-
*
|
|
3046
|
-
*
|
|
3047
|
-
*
|
|
3273
|
+
* Get the token that precedes a given node or token.
|
|
3274
|
+
* @param nodeOrToken - The AST node or token.
|
|
3275
|
+
* @param skipOptions? - Options object.
|
|
3276
|
+
* If is a number, equivalent to `{ skip: n }`.
|
|
3277
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3278
|
+
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
3048
3279
|
*/
|
|
3049
|
-
|
|
3280
|
+
declare function getTokenBefore<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
3050
3281
|
/**
|
|
3051
|
-
*
|
|
3282
|
+
* Get the token that precedes a given node or token.
|
|
3052
3283
|
*
|
|
3053
|
-
*
|
|
3284
|
+
* @deprecated Use `sourceCode.getTokenBefore` with `includeComments: true` instead.
|
|
3285
|
+
*
|
|
3286
|
+
* @param nodeOrToken The AST node or token.
|
|
3287
|
+
* @param skip - Number of tokens to skip.
|
|
3288
|
+
* @returns `TokenOrComment | null`.
|
|
3054
3289
|
*/
|
|
3055
|
-
|
|
3056
|
-
//#endregion
|
|
3057
|
-
//#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
|
|
3058
|
-
// ==================================================================================================
|
|
3059
|
-
// JSON Schema Draft 04
|
|
3060
|
-
// ==================================================================================================
|
|
3290
|
+
declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
|
|
3061
3291
|
/**
|
|
3062
|
-
*
|
|
3292
|
+
* Get the tokens that precede a given node or token.
|
|
3293
|
+
* @param nodeOrToken - The AST node or token.
|
|
3294
|
+
* @param countOptions? - Options object.
|
|
3295
|
+
* If is a number, equivalent to `{ count: n }`.
|
|
3296
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3297
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3063
3298
|
*/
|
|
3064
|
-
|
|
3065
|
-
| "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
|
|
3299
|
+
declare function getTokensBefore<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
3066
3300
|
/**
|
|
3067
|
-
*
|
|
3301
|
+
* Get the token that follows a given node or token.
|
|
3302
|
+
* @param nodeOrToken - The AST node or token.
|
|
3303
|
+
* @param skipOptions? - Options object.
|
|
3304
|
+
* If is a number, equivalent to `{ skip: n }`.
|
|
3305
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3306
|
+
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
3068
3307
|
*/
|
|
3069
|
-
|
|
3070
|
-
| number | boolean | JSONSchema4Object | JSONSchema4Array | null;
|
|
3071
|
-
// Workaround for infinite type recursion
|
|
3072
|
-
interface JSONSchema4Object {
|
|
3073
|
-
[key: string]: JSONSchema4Type;
|
|
3074
|
-
}
|
|
3075
|
-
// Workaround for infinite type recursion
|
|
3076
|
-
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
3077
|
-
interface JSONSchema4Array extends Array<JSONSchema4Type> {}
|
|
3308
|
+
declare function getTokenAfter<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
3078
3309
|
/**
|
|
3079
|
-
*
|
|
3310
|
+
* Get the token that follows a given node or token.
|
|
3080
3311
|
*
|
|
3081
|
-
*
|
|
3082
|
-
* - 'http://json-schema.org/schema#'
|
|
3083
|
-
* - 'http://json-schema.org/hyper-schema#'
|
|
3084
|
-
* - 'http://json-schema.org/draft-04/schema#'
|
|
3085
|
-
* - 'http://json-schema.org/draft-04/hyper-schema#'
|
|
3086
|
-
* - 'http://json-schema.org/draft-03/schema#'
|
|
3087
|
-
* - 'http://json-schema.org/draft-03/hyper-schema#'
|
|
3312
|
+
* @deprecated Use `sourceCode.getTokenAfter` with `includeComments: true` instead.
|
|
3088
3313
|
*
|
|
3089
|
-
* @
|
|
3314
|
+
* @param nodeOrToken The AST node or token.
|
|
3315
|
+
* @param skip - Number of tokens to skip.
|
|
3316
|
+
* @returns `TokenOrComment | null`.
|
|
3090
3317
|
*/
|
|
3091
|
-
|
|
3318
|
+
declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
|
|
3092
3319
|
/**
|
|
3093
|
-
*
|
|
3094
|
-
* @
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
* This attribute is a string that provides a short description of the
|
|
3102
|
-
* instance property.
|
|
3103
|
-
*
|
|
3104
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
|
|
3105
|
-
*/
|
|
3106
|
-
title?: string | undefined;
|
|
3107
|
-
/**
|
|
3108
|
-
* This attribute is a string that provides a full description of the of
|
|
3109
|
-
* purpose the instance property.
|
|
3110
|
-
*
|
|
3111
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
|
|
3112
|
-
*/
|
|
3113
|
-
description?: string | undefined;
|
|
3114
|
-
default?: JSONSchema4Type | undefined;
|
|
3115
|
-
multipleOf?: number | undefined;
|
|
3116
|
-
maximum?: number | undefined;
|
|
3117
|
-
exclusiveMaximum?: boolean | undefined;
|
|
3118
|
-
minimum?: number | undefined;
|
|
3119
|
-
exclusiveMinimum?: boolean | undefined;
|
|
3120
|
-
maxLength?: number | undefined;
|
|
3121
|
-
minLength?: number | undefined;
|
|
3122
|
-
pattern?: string | undefined;
|
|
3123
|
-
/**
|
|
3124
|
-
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
|
|
3125
|
-
*
|
|
3126
|
-
* This provides a definition for additional items in an array instance
|
|
3127
|
-
* when tuple definitions of the items is provided. This can be false
|
|
3128
|
-
* to indicate additional items in the array are not allowed, or it can
|
|
3129
|
-
* be a schema that defines the schema of the additional items.
|
|
3130
|
-
*
|
|
3131
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
|
|
3132
|
-
*/
|
|
3133
|
-
additionalItems?: boolean | JSONSchema4 | undefined;
|
|
3134
|
-
/**
|
|
3135
|
-
* This attribute defines the allowed items in an instance array, and
|
|
3136
|
-
* MUST be a schema or an array of schemas. The default value is an
|
|
3137
|
-
* empty schema which allows any value for items in the instance array.
|
|
3138
|
-
*
|
|
3139
|
-
* When this attribute value is a schema and the instance value is an
|
|
3140
|
-
* array, then all the items in the array MUST be valid according to the
|
|
3141
|
-
* schema.
|
|
3142
|
-
*
|
|
3143
|
-
* When this attribute value is an array of schemas and the instance
|
|
3144
|
-
* value is an array, each position in the instance array MUST conform
|
|
3145
|
-
* to the schema in the corresponding position for this array. This
|
|
3146
|
-
* called tuple typing. When tuple typing is used, additional items are
|
|
3147
|
-
* allowed, disallowed, or constrained by the "additionalItems"
|
|
3148
|
-
* (Section 5.6) attribute using the same rules as
|
|
3149
|
-
* "additionalProperties" (Section 5.4) for objects.
|
|
3150
|
-
*
|
|
3151
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
|
|
3152
|
-
*/
|
|
3153
|
-
items?: JSONSchema4 | JSONSchema4[] | undefined;
|
|
3154
|
-
maxItems?: number | undefined;
|
|
3155
|
-
minItems?: number | undefined;
|
|
3156
|
-
uniqueItems?: boolean | undefined;
|
|
3157
|
-
maxProperties?: number | undefined;
|
|
3158
|
-
minProperties?: number | undefined;
|
|
3159
|
-
/**
|
|
3160
|
-
* This attribute indicates if the instance must have a value, and not
|
|
3161
|
-
* be undefined. This is false by default, making the instance
|
|
3162
|
-
* optional.
|
|
3163
|
-
*
|
|
3164
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
|
|
3165
|
-
*/
|
|
3166
|
-
required?: boolean | string[] | undefined;
|
|
3167
|
-
/**
|
|
3168
|
-
* This attribute defines a schema for all properties that are not
|
|
3169
|
-
* explicitly defined in an object type definition. If specified, the
|
|
3170
|
-
* value MUST be a schema or a boolean. If false is provided, no
|
|
3171
|
-
* additional properties are allowed beyond the properties defined in
|
|
3172
|
-
* the schema. The default value is an empty schema which allows any
|
|
3173
|
-
* value for additional properties.
|
|
3174
|
-
*
|
|
3175
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
|
|
3176
|
-
*/
|
|
3177
|
-
additionalProperties?: boolean | JSONSchema4 | undefined;
|
|
3178
|
-
definitions?: {
|
|
3179
|
-
[k: string]: JSONSchema4;
|
|
3180
|
-
} | undefined;
|
|
3181
|
-
/**
|
|
3182
|
-
* This attribute is an object with property definitions that define the
|
|
3183
|
-
* valid values of instance object property values. When the instance
|
|
3184
|
-
* value is an object, the property values of the instance object MUST
|
|
3185
|
-
* conform to the property definitions in this object. In this object,
|
|
3186
|
-
* each property definition's value MUST be a schema, and the property's
|
|
3187
|
-
* name MUST be the name of the instance property that it defines. The
|
|
3188
|
-
* instance property value MUST be valid according to the schema from
|
|
3189
|
-
* the property definition. Properties are considered unordered, the
|
|
3190
|
-
* order of the instance properties MAY be in any order.
|
|
3191
|
-
*
|
|
3192
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
|
|
3193
|
-
*/
|
|
3194
|
-
properties?: {
|
|
3195
|
-
[k: string]: JSONSchema4;
|
|
3196
|
-
} | undefined;
|
|
3197
|
-
/**
|
|
3198
|
-
* This attribute is an object that defines the schema for a set of
|
|
3199
|
-
* property names of an object instance. The name of each property of
|
|
3200
|
-
* this attribute's object is a regular expression pattern in the ECMA
|
|
3201
|
-
* 262/Perl 5 format, while the value is a schema. If the pattern
|
|
3202
|
-
* matches the name of a property on the instance object, the value of
|
|
3203
|
-
* the instance's property MUST be valid against the pattern name's
|
|
3204
|
-
* schema value.
|
|
3205
|
-
*
|
|
3206
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
|
|
3207
|
-
*/
|
|
3208
|
-
patternProperties?: {
|
|
3209
|
-
[k: string]: JSONSchema4;
|
|
3210
|
-
} | undefined;
|
|
3211
|
-
dependencies?: {
|
|
3212
|
-
[k: string]: JSONSchema4 | string[];
|
|
3213
|
-
} | undefined;
|
|
3214
|
-
/**
|
|
3215
|
-
* This provides an enumeration of all possible values that are valid
|
|
3216
|
-
* for the instance property. This MUST be an array, and each item in
|
|
3217
|
-
* the array represents a possible value for the instance value. If
|
|
3218
|
-
* this attribute is defined, the instance value MUST be one of the
|
|
3219
|
-
* values in the array in order for the schema to be valid.
|
|
3220
|
-
*
|
|
3221
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
|
|
3222
|
-
*/
|
|
3223
|
-
enum?: JSONSchema4Type[] | undefined;
|
|
3224
|
-
/**
|
|
3225
|
-
* A single type, or a union of simple types
|
|
3226
|
-
*/
|
|
3227
|
-
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
|
|
3228
|
-
allOf?: JSONSchema4[] | undefined;
|
|
3229
|
-
anyOf?: JSONSchema4[] | undefined;
|
|
3230
|
-
oneOf?: JSONSchema4[] | undefined;
|
|
3231
|
-
not?: JSONSchema4 | undefined;
|
|
3232
|
-
/**
|
|
3233
|
-
* The value of this property MUST be another schema which will provide
|
|
3234
|
-
* a base schema which the current schema will inherit from. The
|
|
3235
|
-
* inheritance rules are such that any instance that is valid according
|
|
3236
|
-
* to the current schema MUST be valid according to the referenced
|
|
3237
|
-
* schema. This MAY also be an array, in which case, the instance MUST
|
|
3238
|
-
* be valid for all the schemas in the array. A schema that extends
|
|
3239
|
-
* another schema MAY define additional attributes, constrain existing
|
|
3240
|
-
* attributes, or add other constraints.
|
|
3241
|
-
*
|
|
3242
|
-
* Conceptually, the behavior of extends can be seen as validating an
|
|
3243
|
-
* instance against all constraints in the extending schema as well as
|
|
3244
|
-
* the extended schema(s).
|
|
3245
|
-
*
|
|
3246
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
|
|
3247
|
-
*/
|
|
3248
|
-
extends?: string | string[] | undefined;
|
|
3249
|
-
/**
|
|
3250
|
-
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
|
|
3251
|
-
*/
|
|
3252
|
-
[k: string]: any;
|
|
3253
|
-
format?: string | undefined;
|
|
3254
|
-
}
|
|
3255
|
-
//#endregion
|
|
3256
|
-
//#region src-js/plugins/options.d.ts
|
|
3320
|
+
* Get the tokens that follow a given node or token.
|
|
3321
|
+
* @param nodeOrToken - The AST node or token.
|
|
3322
|
+
* @param countOptions? - Options object.
|
|
3323
|
+
* If is a number, equivalent to `{ count: n }`.
|
|
3324
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3325
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3326
|
+
*/
|
|
3327
|
+
declare function getTokensAfter<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
3257
3328
|
/**
|
|
3258
|
-
*
|
|
3329
|
+
* Get all of the tokens between two non-overlapping nodes.
|
|
3330
|
+
* @param left - Node or token before the desired token range.
|
|
3331
|
+
* @param right - Node or token after the desired token range.
|
|
3332
|
+
* @param countOptions? - Options object. If is a function, equivalent to `{ filter: fn }`.
|
|
3333
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3259
3334
|
*/
|
|
3260
|
-
type Options = JsonValue[];
|
|
3261
3335
|
/**
|
|
3262
|
-
*
|
|
3263
|
-
*
|
|
3264
|
-
*
|
|
3265
|
-
*
|
|
3266
|
-
*
|
|
3267
|
-
* - `JSONSchema4[]` - Array shorthand where each element describes corresponding options element.
|
|
3268
|
-
* - `false` - Opts out of schema validation (not recommended).
|
|
3336
|
+
* Get all of the tokens between two non-overlapping nodes.
|
|
3337
|
+
* @param left - Node or token before the desired token range.
|
|
3338
|
+
* @param right - Node or token after the desired token range.
|
|
3339
|
+
* @param padding - Number of extra tokens on either side of center.
|
|
3340
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3269
3341
|
*/
|
|
3270
|
-
|
|
3271
|
-
//#endregion
|
|
3272
|
-
//#region src-js/plugins/fix.d.ts
|
|
3273
|
-
type FixFn = (fixer: Fixer) => Fix | Array<Fix | null | undefined> | IterableIterator<Fix | null | undefined> | null | undefined;
|
|
3342
|
+
declare function getTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
3274
3343
|
/**
|
|
3275
|
-
*
|
|
3276
|
-
*
|
|
3277
|
-
*
|
|
3278
|
-
*
|
|
3279
|
-
*
|
|
3280
|
-
*
|
|
3281
|
-
*
|
|
3344
|
+
* Get the first token between two non-overlapping nodes.
|
|
3345
|
+
* @param left - Node or token before the desired token range.
|
|
3346
|
+
* @param right - Node or token after the desired token range.
|
|
3347
|
+
* @param skipOptions? - Options object.
|
|
3348
|
+
* If is a number, equivalent to `{ skip: n }`.
|
|
3349
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3350
|
+
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
3282
3351
|
*/
|
|
3283
|
-
|
|
3284
|
-
range: Range;
|
|
3285
|
-
text: string;
|
|
3286
|
-
}
|
|
3287
|
-
declare const FIXER: Readonly<{
|
|
3288
|
-
insertTextBefore(nodeOrToken: Ranged, text: string): Fix;
|
|
3289
|
-
insertTextBeforeRange(range: Range, text: string): Fix;
|
|
3290
|
-
insertTextAfter(nodeOrToken: Ranged, text: string): Fix;
|
|
3291
|
-
insertTextAfterRange(range: Range, text: string): Fix;
|
|
3292
|
-
remove(nodeOrToken: Ranged): Fix;
|
|
3293
|
-
removeRange(range: Range): Fix;
|
|
3294
|
-
replaceText(nodeOrToken: Ranged, text: string): Fix;
|
|
3295
|
-
replaceTextRange(range: Range, text: string): Fix;
|
|
3296
|
-
}>;
|
|
3297
|
-
type Fixer = typeof FIXER;
|
|
3298
|
-
//#endregion
|
|
3299
|
-
//#region src-js/plugins/report.d.ts
|
|
3352
|
+
declare function getFirstTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
3300
3353
|
/**
|
|
3301
|
-
*
|
|
3302
|
-
*
|
|
3303
|
-
*
|
|
3304
|
-
*
|
|
3305
|
-
*
|
|
3354
|
+
* Get the first tokens between two non-overlapping nodes.
|
|
3355
|
+
* @param left - Node or token before the desired token range.
|
|
3356
|
+
* @param right - Node or token after the desired token range.
|
|
3357
|
+
* @param countOptions? - Options object.
|
|
3358
|
+
* If is a number, equivalent to `{ count: n }`.
|
|
3359
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3360
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3306
3361
|
*/
|
|
3307
|
-
|
|
3308
|
-
interface DiagnosticBase {
|
|
3309
|
-
message?: string | null | undefined;
|
|
3310
|
-
messageId?: string | null | undefined;
|
|
3311
|
-
node?: Ranged;
|
|
3312
|
-
loc?: LocationWithOptionalEnd | LineColumn;
|
|
3313
|
-
data?: DiagnosticData | null | undefined;
|
|
3314
|
-
fix?: FixFn;
|
|
3315
|
-
suggest?: Suggestion[] | null | undefined;
|
|
3316
|
-
}
|
|
3362
|
+
declare function getFirstTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
3317
3363
|
/**
|
|
3318
|
-
*
|
|
3364
|
+
* Get the last token between two non-overlapping nodes.
|
|
3365
|
+
* @param left - Node or token before the desired token range.
|
|
3366
|
+
* @param right - Node or token after the desired token range.
|
|
3367
|
+
* @param skipOptions? - Options object.
|
|
3368
|
+
* If is a number, equivalent to `{ skip: n }`.
|
|
3369
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3370
|
+
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
3319
3371
|
*/
|
|
3320
|
-
|
|
3321
|
-
start: LineColumn;
|
|
3322
|
-
end?: LineColumn | null | undefined;
|
|
3323
|
-
}
|
|
3372
|
+
declare function getLastTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
|
|
3324
3373
|
/**
|
|
3325
|
-
*
|
|
3374
|
+
* Get the last tokens between two non-overlapping nodes.
|
|
3375
|
+
* @param left - Node or token before the desired token range.
|
|
3376
|
+
* @param right - Node or token after the desired token range.
|
|
3377
|
+
* @param countOptions? - Options object.
|
|
3378
|
+
* If is a number, equivalent to `{ count: n }`.
|
|
3379
|
+
* If is a function, equivalent to `{ filter: fn }`.
|
|
3380
|
+
* @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
|
|
3326
3381
|
*/
|
|
3327
|
-
|
|
3382
|
+
declare function getLastTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
|
|
3328
3383
|
/**
|
|
3329
|
-
*
|
|
3384
|
+
* Get the token starting at the specified index.
|
|
3385
|
+
* @param offset - Start offset of the token.
|
|
3386
|
+
* @param rangeOptions - Options object.
|
|
3387
|
+
* @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
|
|
3330
3388
|
*/
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3389
|
+
declare function getTokenByRangeStart<Options extends RangeOptions | null | undefined>(offset: number, rangeOptions?: Options): TokenResult<Options> | null;
|
|
3390
|
+
/**
|
|
3391
|
+
* Determine if two nodes or tokens have at least one whitespace character between them.
|
|
3392
|
+
* Order does not matter.
|
|
3393
|
+
*
|
|
3394
|
+
* Returns `false` if the given nodes or tokens overlap.
|
|
3395
|
+
*
|
|
3396
|
+
* Checks for whitespace *between tokens*, not including whitespace *inside tokens*.
|
|
3397
|
+
* e.g. Returns `false` for `isSpaceBetween(x, y)` in `x+" "+y`.
|
|
3398
|
+
*
|
|
3399
|
+
* @param first - The first node or token to check between.
|
|
3400
|
+
* @param second - The second node or token to check between.
|
|
3401
|
+
* @returns `true` if there is a whitespace character between
|
|
3402
|
+
* any of the tokens found between the two given nodes or tokens.
|
|
3403
|
+
*/
|
|
3404
|
+
declare function isSpaceBetween(first: NodeOrToken, second: NodeOrToken): boolean;
|
|
3405
|
+
/**
|
|
3406
|
+
* Determine if two nodes or tokens have at least one whitespace character between them.
|
|
3407
|
+
* Order does not matter.
|
|
3408
|
+
*
|
|
3409
|
+
* Returns `false` if the given nodes or tokens overlap.
|
|
3410
|
+
*
|
|
3411
|
+
* Checks for whitespace *between tokens*, not including whitespace *inside tokens*.
|
|
3412
|
+
* e.g. Returns `false` for `isSpaceBetween(x, y)` in `x+" "+y`.
|
|
3413
|
+
*
|
|
3414
|
+
* Unlike `SourceCode#isSpaceBetween`, this function does return `true` if there is a `JSText` token between the two
|
|
3415
|
+
* input tokens, and it contains whitespace.
|
|
3416
|
+
* e.g. Returns `true` for `isSpaceBetweenTokens(x, slash)` in `<X>a b</X>`.
|
|
3417
|
+
*
|
|
3418
|
+
* @deprecated Use `sourceCode.isSpaceBetween` instead.
|
|
3419
|
+
*
|
|
3420
|
+
* @param first - The first node or token to check between.
|
|
3421
|
+
* @param second - The second node or token to check between.
|
|
3422
|
+
* @returns `true` if there is a whitespace character between
|
|
3423
|
+
* any of the tokens found between the two given nodes or tokens.
|
|
3424
|
+
*/
|
|
3425
|
+
declare function isSpaceBetweenTokens(first: NodeOrToken, second: NodeOrToken): boolean;
|
|
3426
|
+
/**
|
|
3427
|
+
* Find the index of the first entry in a `Int32Array` buffer whose `start` is >= `offset`, via binary search.
|
|
3428
|
+
*
|
|
3429
|
+
* Each entry occupies 4 x u32s (16 bytes), with `start` as the first u32.
|
|
3430
|
+
* Searched range starts at `startIndex` and ends at `length`.
|
|
3431
|
+
*
|
|
3432
|
+
* Returns `length` if all entries have `start` < `offset`.
|
|
3433
|
+
*
|
|
3434
|
+
* Note: Source text is limited to 1 GiB max, so number of tokens cannot exceed 2^30.
|
|
3435
|
+
* This makes it safe to use `>> 1` for division by 2 below (which is faster than `>>> 1`).
|
|
3436
|
+
*
|
|
3437
|
+
* @param int32 - `Int32Array` buffer (tokens, comments, or tokensAndComments)
|
|
3438
|
+
* @param offset - Source offset to search for
|
|
3439
|
+
* @param startIndex - Starting entry index for the search
|
|
3440
|
+
* @param length - Total number of entries in the buffer
|
|
3441
|
+
* @returns Index of first entry with `start >= offset`
|
|
3442
|
+
*/
|
|
3443
|
+
declare function firstTokenAtOrAfter(int32: Int32Array, offset: number, startIndex: number, length: number): number;
|
|
3338
3444
|
//#endregion
|
|
3339
3445
|
//#region src-js/plugins/source_code.d.ts
|
|
3340
3446
|
declare const SOURCE_CODE: Readonly<{
|
|
@@ -3357,12 +3463,7 @@ declare const SOURCE_CODE: Readonly<{
|
|
|
3357
3463
|
/**
|
|
3358
3464
|
* `ScopeManager` for the file.
|
|
3359
3465
|
*/
|
|
3360
|
-
readonly scopeManager:
|
|
3361
|
-
readonly scopes: Scope[];
|
|
3362
|
-
readonly globalScope: Scope | null;
|
|
3363
|
-
getDeclaredVariables(node: Node): Variable[];
|
|
3364
|
-
acquire(node: Node, inner?: boolean): Scope | null;
|
|
3365
|
-
}>;
|
|
3466
|
+
readonly scopeManager: ScopeManager;
|
|
3366
3467
|
/**
|
|
3367
3468
|
* Visitor keys to traverse this AST.
|
|
3368
3469
|
*/
|
|
@@ -3400,7 +3501,7 @@ declare const SOURCE_CODE: Readonly<{
|
|
|
3400
3501
|
* @returns All the ancestor nodes in the AST, not including the provided node,
|
|
3401
3502
|
* starting from the root node at index 0 and going inwards to the parent node.
|
|
3402
3503
|
*/
|
|
3403
|
-
getAncestors(node: Node
|
|
3504
|
+
getAncestors(node: Node): Node[];
|
|
3404
3505
|
/**
|
|
3405
3506
|
* Get source text as array of lines, split according to specification's definition of line breaks.
|
|
3406
3507
|
*/
|
|
@@ -3444,6 +3545,256 @@ declare const SOURCE_CODE: Readonly<{
|
|
|
3444
3545
|
type SourceCode = typeof SOURCE_CODE;
|
|
3445
3546
|
//#endregion
|
|
3446
3547
|
//#region src-js/plugins/context.d.ts
|
|
3548
|
+
declare const LANGUAGE_OPTIONS: {
|
|
3549
|
+
/**
|
|
3550
|
+
* Source type of the file being linted.
|
|
3551
|
+
*/
|
|
3552
|
+
readonly sourceType: ModuleKind;
|
|
3553
|
+
/**
|
|
3554
|
+
* ECMAScript version of the file being linted.
|
|
3555
|
+
*/
|
|
3556
|
+
ecmaVersion: number;
|
|
3557
|
+
/**
|
|
3558
|
+
* Parser used to parse the file being linted.
|
|
3559
|
+
*/
|
|
3560
|
+
parser: Readonly<{
|
|
3561
|
+
/**
|
|
3562
|
+
* Parser name.
|
|
3563
|
+
*/
|
|
3564
|
+
name: "oxlint";
|
|
3565
|
+
/**
|
|
3566
|
+
* Parser version.
|
|
3567
|
+
*/
|
|
3568
|
+
version: string;
|
|
3569
|
+
/**
|
|
3570
|
+
* Parse code into an AST.
|
|
3571
|
+
* @param code - Code to parse
|
|
3572
|
+
* @param options? - Parser options
|
|
3573
|
+
* @returns AST
|
|
3574
|
+
*/
|
|
3575
|
+
parse(code: string, options?: Record<string, unknown>): Program;
|
|
3576
|
+
/**
|
|
3577
|
+
* Visitor keys for AST nodes.
|
|
3578
|
+
*/
|
|
3579
|
+
VisitorKeys: Readonly<{
|
|
3580
|
+
DebuggerStatement: readonly never[];
|
|
3581
|
+
EmptyStatement: readonly never[];
|
|
3582
|
+
Literal: readonly never[];
|
|
3583
|
+
PrivateIdentifier: readonly never[];
|
|
3584
|
+
Super: readonly never[];
|
|
3585
|
+
TemplateElement: readonly never[];
|
|
3586
|
+
ThisExpression: readonly never[];
|
|
3587
|
+
JSXClosingFragment: readonly never[];
|
|
3588
|
+
JSXEmptyExpression: readonly never[];
|
|
3589
|
+
JSXIdentifier: readonly never[];
|
|
3590
|
+
JSXOpeningFragment: readonly never[];
|
|
3591
|
+
JSXText: readonly never[];
|
|
3592
|
+
TSAnyKeyword: readonly never[];
|
|
3593
|
+
TSBigIntKeyword: readonly never[];
|
|
3594
|
+
TSBooleanKeyword: readonly never[];
|
|
3595
|
+
TSIntrinsicKeyword: readonly never[];
|
|
3596
|
+
TSJSDocUnknownType: readonly never[];
|
|
3597
|
+
TSNeverKeyword: readonly never[];
|
|
3598
|
+
TSNullKeyword: readonly never[];
|
|
3599
|
+
TSNumberKeyword: readonly never[];
|
|
3600
|
+
TSObjectKeyword: readonly never[];
|
|
3601
|
+
TSStringKeyword: readonly never[];
|
|
3602
|
+
TSSymbolKeyword: readonly never[];
|
|
3603
|
+
TSThisType: readonly never[];
|
|
3604
|
+
TSUndefinedKeyword: readonly never[];
|
|
3605
|
+
TSUnknownKeyword: readonly never[];
|
|
3606
|
+
TSVoidKeyword: readonly never[];
|
|
3607
|
+
AccessorProperty: readonly string[];
|
|
3608
|
+
ArrayExpression: readonly string[];
|
|
3609
|
+
ArrayPattern: readonly string[];
|
|
3610
|
+
ArrowFunctionExpression: readonly string[];
|
|
3611
|
+
AssignmentExpression: readonly string[];
|
|
3612
|
+
AssignmentPattern: readonly string[];
|
|
3613
|
+
AwaitExpression: readonly string[];
|
|
3614
|
+
BinaryExpression: readonly string[];
|
|
3615
|
+
BlockStatement: readonly string[];
|
|
3616
|
+
BreakStatement: readonly string[];
|
|
3617
|
+
CallExpression: readonly string[];
|
|
3618
|
+
CatchClause: readonly string[];
|
|
3619
|
+
ChainExpression: readonly string[];
|
|
3620
|
+
ClassBody: readonly string[];
|
|
3621
|
+
ClassDeclaration: readonly string[];
|
|
3622
|
+
ClassExpression: readonly string[];
|
|
3623
|
+
ConditionalExpression: readonly string[];
|
|
3624
|
+
ContinueStatement: readonly string[];
|
|
3625
|
+
Decorator: readonly string[];
|
|
3626
|
+
DoWhileStatement: readonly string[];
|
|
3627
|
+
ExportAllDeclaration: readonly string[];
|
|
3628
|
+
ExportDefaultDeclaration: readonly string[];
|
|
3629
|
+
ExportNamedDeclaration: readonly string[];
|
|
3630
|
+
ExportSpecifier: readonly string[];
|
|
3631
|
+
ExpressionStatement: readonly string[];
|
|
3632
|
+
ForInStatement: readonly string[];
|
|
3633
|
+
ForOfStatement: readonly string[];
|
|
3634
|
+
ForStatement: readonly string[];
|
|
3635
|
+
FunctionDeclaration: readonly string[];
|
|
3636
|
+
FunctionExpression: readonly string[];
|
|
3637
|
+
Identifier: readonly string[];
|
|
3638
|
+
IfStatement: readonly string[];
|
|
3639
|
+
ImportAttribute: readonly string[];
|
|
3640
|
+
ImportDeclaration: readonly string[];
|
|
3641
|
+
ImportDefaultSpecifier: readonly string[];
|
|
3642
|
+
ImportExpression: readonly string[];
|
|
3643
|
+
ImportNamespaceSpecifier: readonly string[];
|
|
3644
|
+
ImportSpecifier: readonly string[];
|
|
3645
|
+
LabeledStatement: readonly string[];
|
|
3646
|
+
LogicalExpression: readonly string[];
|
|
3647
|
+
MemberExpression: readonly string[];
|
|
3648
|
+
MetaProperty: readonly string[];
|
|
3649
|
+
MethodDefinition: readonly string[];
|
|
3650
|
+
NewExpression: readonly string[];
|
|
3651
|
+
ObjectExpression: readonly string[];
|
|
3652
|
+
ObjectPattern: readonly string[];
|
|
3653
|
+
ParenthesizedExpression: readonly string[];
|
|
3654
|
+
Program: readonly string[];
|
|
3655
|
+
Property: readonly string[];
|
|
3656
|
+
PropertyDefinition: readonly string[];
|
|
3657
|
+
RestElement: readonly string[];
|
|
3658
|
+
ReturnStatement: readonly string[];
|
|
3659
|
+
SequenceExpression: readonly string[];
|
|
3660
|
+
SpreadElement: readonly string[];
|
|
3661
|
+
StaticBlock: readonly string[];
|
|
3662
|
+
SwitchCase: readonly string[];
|
|
3663
|
+
SwitchStatement: readonly string[];
|
|
3664
|
+
TaggedTemplateExpression: readonly string[];
|
|
3665
|
+
TemplateLiteral: readonly string[];
|
|
3666
|
+
ThrowStatement: readonly string[];
|
|
3667
|
+
TryStatement: readonly string[];
|
|
3668
|
+
UnaryExpression: readonly string[];
|
|
3669
|
+
UpdateExpression: readonly string[];
|
|
3670
|
+
V8IntrinsicExpression: readonly string[];
|
|
3671
|
+
VariableDeclaration: readonly string[];
|
|
3672
|
+
VariableDeclarator: readonly string[];
|
|
3673
|
+
WhileStatement: readonly string[];
|
|
3674
|
+
WithStatement: readonly string[];
|
|
3675
|
+
YieldExpression: readonly string[];
|
|
3676
|
+
JSXAttribute: readonly string[];
|
|
3677
|
+
JSXClosingElement: readonly string[];
|
|
3678
|
+
JSXElement: readonly string[];
|
|
3679
|
+
JSXExpressionContainer: readonly string[];
|
|
3680
|
+
JSXFragment: readonly string[];
|
|
3681
|
+
JSXMemberExpression: readonly string[];
|
|
3682
|
+
JSXNamespacedName: readonly string[];
|
|
3683
|
+
JSXOpeningElement: readonly string[];
|
|
3684
|
+
JSXSpreadAttribute: readonly string[];
|
|
3685
|
+
JSXSpreadChild: readonly string[];
|
|
3686
|
+
TSAbstractAccessorProperty: readonly string[];
|
|
3687
|
+
TSAbstractMethodDefinition: readonly string[];
|
|
3688
|
+
TSAbstractPropertyDefinition: readonly string[];
|
|
3689
|
+
TSArrayType: readonly string[];
|
|
3690
|
+
TSAsExpression: readonly string[];
|
|
3691
|
+
TSCallSignatureDeclaration: readonly string[];
|
|
3692
|
+
TSClassImplements: readonly string[];
|
|
3693
|
+
TSConditionalType: readonly string[];
|
|
3694
|
+
TSConstructSignatureDeclaration: readonly string[];
|
|
3695
|
+
TSConstructorType: readonly string[];
|
|
3696
|
+
TSDeclareFunction: readonly string[];
|
|
3697
|
+
TSEmptyBodyFunctionExpression: readonly string[];
|
|
3698
|
+
TSEnumBody: readonly string[];
|
|
3699
|
+
TSEnumDeclaration: readonly string[];
|
|
3700
|
+
TSEnumMember: readonly string[];
|
|
3701
|
+
TSExportAssignment: readonly string[];
|
|
3702
|
+
TSExternalModuleReference: readonly string[];
|
|
3703
|
+
TSFunctionType: readonly string[];
|
|
3704
|
+
TSImportEqualsDeclaration: readonly string[];
|
|
3705
|
+
TSImportType: readonly string[];
|
|
3706
|
+
TSIndexSignature: readonly string[];
|
|
3707
|
+
TSIndexedAccessType: readonly string[];
|
|
3708
|
+
TSInferType: readonly string[];
|
|
3709
|
+
TSInstantiationExpression: readonly string[];
|
|
3710
|
+
TSInterfaceBody: readonly string[];
|
|
3711
|
+
TSInterfaceDeclaration: readonly string[];
|
|
3712
|
+
TSInterfaceHeritage: readonly string[];
|
|
3713
|
+
TSIntersectionType: readonly string[];
|
|
3714
|
+
TSJSDocNonNullableType: readonly string[];
|
|
3715
|
+
TSJSDocNullableType: readonly string[];
|
|
3716
|
+
TSLiteralType: readonly string[];
|
|
3717
|
+
TSMappedType: readonly string[];
|
|
3718
|
+
TSMethodSignature: readonly string[];
|
|
3719
|
+
TSModuleBlock: readonly string[];
|
|
3720
|
+
TSModuleDeclaration: readonly string[];
|
|
3721
|
+
TSNamedTupleMember: readonly string[];
|
|
3722
|
+
TSNamespaceExportDeclaration: readonly string[];
|
|
3723
|
+
TSNonNullExpression: readonly string[];
|
|
3724
|
+
TSOptionalType: readonly string[];
|
|
3725
|
+
TSParameterProperty: readonly string[];
|
|
3726
|
+
TSParenthesizedType: readonly string[];
|
|
3727
|
+
TSPropertySignature: readonly string[];
|
|
3728
|
+
TSQualifiedName: readonly string[];
|
|
3729
|
+
TSRestType: readonly string[];
|
|
3730
|
+
TSSatisfiesExpression: readonly string[];
|
|
3731
|
+
TSTemplateLiteralType: readonly string[];
|
|
3732
|
+
TSTupleType: readonly string[];
|
|
3733
|
+
TSTypeAliasDeclaration: readonly string[];
|
|
3734
|
+
TSTypeAnnotation: readonly string[];
|
|
3735
|
+
TSTypeAssertion: readonly string[];
|
|
3736
|
+
TSTypeLiteral: readonly string[];
|
|
3737
|
+
TSTypeOperator: readonly string[];
|
|
3738
|
+
TSTypeParameter: readonly string[];
|
|
3739
|
+
TSTypeParameterDeclaration: readonly string[];
|
|
3740
|
+
TSTypeParameterInstantiation: readonly string[];
|
|
3741
|
+
TSTypePredicate: readonly string[];
|
|
3742
|
+
TSTypeQuery: readonly string[];
|
|
3743
|
+
TSTypeReference: readonly string[];
|
|
3744
|
+
TSUnionType: readonly string[];
|
|
3745
|
+
}>;
|
|
3746
|
+
/**
|
|
3747
|
+
* Ast node types.
|
|
3748
|
+
*/
|
|
3749
|
+
readonly Syntax: Readonly<Record<string, string>>;
|
|
3750
|
+
/**
|
|
3751
|
+
* Latest ECMAScript version supported by parser.
|
|
3752
|
+
*/
|
|
3753
|
+
latestEcmaVersion: 17;
|
|
3754
|
+
/**
|
|
3755
|
+
* ECMAScript versions supported by parser.
|
|
3756
|
+
*/
|
|
3757
|
+
supportedEcmaVersions: readonly number[];
|
|
3758
|
+
}>;
|
|
3759
|
+
/**
|
|
3760
|
+
* Parser options used to parse the file being linted.
|
|
3761
|
+
*/
|
|
3762
|
+
parserOptions: Readonly<{
|
|
3763
|
+
/**
|
|
3764
|
+
* Source type of the file being linted.
|
|
3765
|
+
*/
|
|
3766
|
+
readonly sourceType: ModuleKind;
|
|
3767
|
+
/**
|
|
3768
|
+
* ECMA features.
|
|
3769
|
+
*/
|
|
3770
|
+
ecmaFeatures: Readonly<{
|
|
3771
|
+
/**
|
|
3772
|
+
* `true` if file was parsed as JSX.
|
|
3773
|
+
*/
|
|
3774
|
+
readonly jsx: boolean;
|
|
3775
|
+
/**
|
|
3776
|
+
* `true` if file was parsed with top-level `return` statements allowed.
|
|
3777
|
+
*/
|
|
3778
|
+
readonly globalReturn: boolean;
|
|
3779
|
+
/**
|
|
3780
|
+
* `true` if file was parsed as strict mode code.
|
|
3781
|
+
*/
|
|
3782
|
+
readonly impliedStrict: boolean;
|
|
3783
|
+
}>;
|
|
3784
|
+
}>;
|
|
3785
|
+
/**
|
|
3786
|
+
* Globals defined for the file being linted.
|
|
3787
|
+
*/
|
|
3788
|
+
readonly globals: Readonly<Globals$1>;
|
|
3789
|
+
/**
|
|
3790
|
+
* Environments defined for the file being linted.
|
|
3791
|
+
*/
|
|
3792
|
+
readonly env: Readonly<Envs$1>;
|
|
3793
|
+
};
|
|
3794
|
+
/**
|
|
3795
|
+
* Language options used when parsing a file.
|
|
3796
|
+
*/
|
|
3797
|
+
type LanguageOptions$1 = Readonly<typeof LANGUAGE_OPTIONS>;
|
|
3447
3798
|
declare const FILE_CONTEXT: Readonly<{
|
|
3448
3799
|
/**
|
|
3449
3800
|
* Absolute path of the file being linted.
|
|
@@ -3478,61 +3829,7 @@ declare const FILE_CONTEXT: Readonly<{
|
|
|
3478
3829
|
/**
|
|
3479
3830
|
* Source code of the file being linted.
|
|
3480
3831
|
*/
|
|
3481
|
-
readonly sourceCode:
|
|
3482
|
-
readonly text: string;
|
|
3483
|
-
readonly hasBOM: boolean;
|
|
3484
|
-
readonly ast: Program;
|
|
3485
|
-
isESTree: true;
|
|
3486
|
-
readonly scopeManager: Readonly<{
|
|
3487
|
-
readonly scopes: Scope[];
|
|
3488
|
-
readonly globalScope: Scope | null;
|
|
3489
|
-
getDeclaredVariables(node: Node): Variable[];
|
|
3490
|
-
acquire(node: Node, inner?: boolean): Scope | null;
|
|
3491
|
-
}>;
|
|
3492
|
-
readonly visitorKeys: Readonly<Record<string, readonly string[]>>;
|
|
3493
|
-
parserServices: Readonly<Record<string, unknown>>;
|
|
3494
|
-
readonly lines: string[];
|
|
3495
|
-
readonly lineStartIndices: number[];
|
|
3496
|
-
readonly tokensAndComments: (TokenType | CommentType)[];
|
|
3497
|
-
getText(node?: Ranged | null, beforeCount?: number | null, afterCount?: number | null): string;
|
|
3498
|
-
getAncestors(node: Node$1): Node$1[];
|
|
3499
|
-
getLines(): string[];
|
|
3500
|
-
getRange: typeof getRange;
|
|
3501
|
-
getLoc: typeof getLoc;
|
|
3502
|
-
getNodeByRangeIndex: typeof getNodeByRangeIndex;
|
|
3503
|
-
getLocFromIndex: typeof getLineColumnFromOffset;
|
|
3504
|
-
getIndexFromLoc: typeof getOffsetFromLineColumn;
|
|
3505
|
-
getAllComments: typeof getAllComments;
|
|
3506
|
-
getCommentsBefore: typeof getCommentsBefore;
|
|
3507
|
-
getCommentsAfter: typeof getCommentsAfter;
|
|
3508
|
-
getCommentsInside: typeof getCommentsInside;
|
|
3509
|
-
commentsExistBetween: typeof commentsExistBetween;
|
|
3510
|
-
getJSDocComment: typeof getJSDocComment;
|
|
3511
|
-
isGlobalReference: typeof isGlobalReference;
|
|
3512
|
-
getDeclaredVariables: typeof getDeclaredVariables;
|
|
3513
|
-
getScope: typeof getScope;
|
|
3514
|
-
markVariableAsUsed: typeof markVariableAsUsed;
|
|
3515
|
-
getTokens: typeof getTokens;
|
|
3516
|
-
getFirstToken: typeof getFirstToken;
|
|
3517
|
-
getFirstTokens: typeof getFirstTokens;
|
|
3518
|
-
getLastToken: typeof getLastToken;
|
|
3519
|
-
getLastTokens: typeof getLastTokens;
|
|
3520
|
-
getTokenBefore: typeof getTokenBefore;
|
|
3521
|
-
getTokenOrCommentBefore: typeof getTokenOrCommentBefore;
|
|
3522
|
-
getTokensBefore: typeof getTokensBefore;
|
|
3523
|
-
getTokenAfter: typeof getTokenAfter;
|
|
3524
|
-
getTokenOrCommentAfter: typeof getTokenOrCommentAfter;
|
|
3525
|
-
getTokensAfter: typeof getTokensAfter;
|
|
3526
|
-
getTokensBetween: typeof getTokensBetween;
|
|
3527
|
-
getFirstTokenBetween: typeof getFirstTokenBetween;
|
|
3528
|
-
getFirstTokensBetween: typeof getFirstTokensBetween;
|
|
3529
|
-
getLastTokenBetween: typeof getLastTokenBetween;
|
|
3530
|
-
getLastTokensBetween: typeof getLastTokensBetween;
|
|
3531
|
-
getTokenByRangeStart: typeof getTokenByRangeStart;
|
|
3532
|
-
isSpaceBetween: typeof isSpaceBetween;
|
|
3533
|
-
isSpaceBetweenTokens: typeof isSpaceBetweenTokens;
|
|
3534
|
-
getDisableDirectives: typeof getDisableDirectives;
|
|
3535
|
-
}>;
|
|
3832
|
+
readonly sourceCode: SourceCode;
|
|
3536
3833
|
/**
|
|
3537
3834
|
* Get source code of the file being linted.
|
|
3538
3835
|
* @returns Source code of the file being linted.
|
|
@@ -3542,256 +3839,11 @@ declare const FILE_CONTEXT: Readonly<{
|
|
|
3542
3839
|
/**
|
|
3543
3840
|
* Language options used when parsing this file.
|
|
3544
3841
|
*/
|
|
3545
|
-
readonly languageOptions:
|
|
3546
|
-
/**
|
|
3547
|
-
* Source type of the file being linted.
|
|
3548
|
-
*/
|
|
3549
|
-
readonly sourceType: ModuleKind;
|
|
3550
|
-
/**
|
|
3551
|
-
* ECMAScript version of the file being linted.
|
|
3552
|
-
*/
|
|
3553
|
-
ecmaVersion: number;
|
|
3554
|
-
/**
|
|
3555
|
-
* Parser used to parse the file being linted.
|
|
3556
|
-
*/
|
|
3557
|
-
parser: Readonly<{
|
|
3558
|
-
/**
|
|
3559
|
-
* Parser name.
|
|
3560
|
-
*/
|
|
3561
|
-
name: "oxlint";
|
|
3562
|
-
/**
|
|
3563
|
-
* Parser version.
|
|
3564
|
-
*/
|
|
3565
|
-
version: string;
|
|
3566
|
-
/**
|
|
3567
|
-
* Parse code into an AST.
|
|
3568
|
-
* @param code - Code to parse
|
|
3569
|
-
* @param options? - Parser options
|
|
3570
|
-
* @returns AST
|
|
3571
|
-
*/
|
|
3572
|
-
parse(code: string, options?: Record<string, unknown>): Program;
|
|
3573
|
-
/**
|
|
3574
|
-
* Visitor keys for AST nodes.
|
|
3575
|
-
*/
|
|
3576
|
-
VisitorKeys: Readonly<{
|
|
3577
|
-
DebuggerStatement: readonly never[];
|
|
3578
|
-
EmptyStatement: readonly never[];
|
|
3579
|
-
Literal: readonly never[];
|
|
3580
|
-
PrivateIdentifier: readonly never[];
|
|
3581
|
-
Super: readonly never[];
|
|
3582
|
-
TemplateElement: readonly never[];
|
|
3583
|
-
ThisExpression: readonly never[];
|
|
3584
|
-
JSXClosingFragment: readonly never[];
|
|
3585
|
-
JSXEmptyExpression: readonly never[];
|
|
3586
|
-
JSXIdentifier: readonly never[];
|
|
3587
|
-
JSXOpeningFragment: readonly never[];
|
|
3588
|
-
JSXText: readonly never[];
|
|
3589
|
-
TSAnyKeyword: readonly never[];
|
|
3590
|
-
TSBigIntKeyword: readonly never[];
|
|
3591
|
-
TSBooleanKeyword: readonly never[];
|
|
3592
|
-
TSIntrinsicKeyword: readonly never[];
|
|
3593
|
-
TSJSDocUnknownType: readonly never[];
|
|
3594
|
-
TSNeverKeyword: readonly never[];
|
|
3595
|
-
TSNullKeyword: readonly never[];
|
|
3596
|
-
TSNumberKeyword: readonly never[];
|
|
3597
|
-
TSObjectKeyword: readonly never[];
|
|
3598
|
-
TSStringKeyword: readonly never[];
|
|
3599
|
-
TSSymbolKeyword: readonly never[];
|
|
3600
|
-
TSThisType: readonly never[];
|
|
3601
|
-
TSUndefinedKeyword: readonly never[];
|
|
3602
|
-
TSUnknownKeyword: readonly never[];
|
|
3603
|
-
TSVoidKeyword: readonly never[];
|
|
3604
|
-
AccessorProperty: readonly string[];
|
|
3605
|
-
ArrayExpression: readonly string[];
|
|
3606
|
-
ArrayPattern: readonly string[];
|
|
3607
|
-
ArrowFunctionExpression: readonly string[];
|
|
3608
|
-
AssignmentExpression: readonly string[];
|
|
3609
|
-
AssignmentPattern: readonly string[];
|
|
3610
|
-
AwaitExpression: readonly string[];
|
|
3611
|
-
BinaryExpression: readonly string[];
|
|
3612
|
-
BlockStatement: readonly string[];
|
|
3613
|
-
BreakStatement: readonly string[];
|
|
3614
|
-
CallExpression: readonly string[];
|
|
3615
|
-
CatchClause: readonly string[];
|
|
3616
|
-
ChainExpression: readonly string[];
|
|
3617
|
-
ClassBody: readonly string[];
|
|
3618
|
-
ClassDeclaration: readonly string[];
|
|
3619
|
-
ClassExpression: readonly string[];
|
|
3620
|
-
ConditionalExpression: readonly string[];
|
|
3621
|
-
ContinueStatement: readonly string[];
|
|
3622
|
-
Decorator: readonly string[];
|
|
3623
|
-
DoWhileStatement: readonly string[];
|
|
3624
|
-
ExportAllDeclaration: readonly string[];
|
|
3625
|
-
ExportDefaultDeclaration: readonly string[];
|
|
3626
|
-
ExportNamedDeclaration: readonly string[];
|
|
3627
|
-
ExportSpecifier: readonly string[];
|
|
3628
|
-
ExpressionStatement: readonly string[];
|
|
3629
|
-
ForInStatement: readonly string[];
|
|
3630
|
-
ForOfStatement: readonly string[];
|
|
3631
|
-
ForStatement: readonly string[];
|
|
3632
|
-
FunctionDeclaration: readonly string[];
|
|
3633
|
-
FunctionExpression: readonly string[];
|
|
3634
|
-
Identifier: readonly string[];
|
|
3635
|
-
IfStatement: readonly string[];
|
|
3636
|
-
ImportAttribute: readonly string[];
|
|
3637
|
-
ImportDeclaration: readonly string[];
|
|
3638
|
-
ImportDefaultSpecifier: readonly string[];
|
|
3639
|
-
ImportExpression: readonly string[];
|
|
3640
|
-
ImportNamespaceSpecifier: readonly string[];
|
|
3641
|
-
ImportSpecifier: readonly string[];
|
|
3642
|
-
LabeledStatement: readonly string[];
|
|
3643
|
-
LogicalExpression: readonly string[];
|
|
3644
|
-
MemberExpression: readonly string[];
|
|
3645
|
-
MetaProperty: readonly string[];
|
|
3646
|
-
MethodDefinition: readonly string[];
|
|
3647
|
-
NewExpression: readonly string[];
|
|
3648
|
-
ObjectExpression: readonly string[];
|
|
3649
|
-
ObjectPattern: readonly string[];
|
|
3650
|
-
ParenthesizedExpression: readonly string[];
|
|
3651
|
-
Program: readonly string[];
|
|
3652
|
-
Property: readonly string[];
|
|
3653
|
-
PropertyDefinition: readonly string[];
|
|
3654
|
-
RestElement: readonly string[];
|
|
3655
|
-
ReturnStatement: readonly string[];
|
|
3656
|
-
SequenceExpression: readonly string[];
|
|
3657
|
-
SpreadElement: readonly string[];
|
|
3658
|
-
StaticBlock: readonly string[];
|
|
3659
|
-
SwitchCase: readonly string[];
|
|
3660
|
-
SwitchStatement: readonly string[];
|
|
3661
|
-
TaggedTemplateExpression: readonly string[];
|
|
3662
|
-
TemplateLiteral: readonly string[];
|
|
3663
|
-
ThrowStatement: readonly string[];
|
|
3664
|
-
TryStatement: readonly string[];
|
|
3665
|
-
UnaryExpression: readonly string[];
|
|
3666
|
-
UpdateExpression: readonly string[];
|
|
3667
|
-
V8IntrinsicExpression: readonly string[];
|
|
3668
|
-
VariableDeclaration: readonly string[];
|
|
3669
|
-
VariableDeclarator: readonly string[];
|
|
3670
|
-
WhileStatement: readonly string[];
|
|
3671
|
-
WithStatement: readonly string[];
|
|
3672
|
-
YieldExpression: readonly string[];
|
|
3673
|
-
JSXAttribute: readonly string[];
|
|
3674
|
-
JSXClosingElement: readonly string[];
|
|
3675
|
-
JSXElement: readonly string[];
|
|
3676
|
-
JSXExpressionContainer: readonly string[];
|
|
3677
|
-
JSXFragment: readonly string[];
|
|
3678
|
-
JSXMemberExpression: readonly string[];
|
|
3679
|
-
JSXNamespacedName: readonly string[];
|
|
3680
|
-
JSXOpeningElement: readonly string[];
|
|
3681
|
-
JSXSpreadAttribute: readonly string[];
|
|
3682
|
-
JSXSpreadChild: readonly string[];
|
|
3683
|
-
TSAbstractAccessorProperty: readonly string[];
|
|
3684
|
-
TSAbstractMethodDefinition: readonly string[];
|
|
3685
|
-
TSAbstractPropertyDefinition: readonly string[];
|
|
3686
|
-
TSArrayType: readonly string[];
|
|
3687
|
-
TSAsExpression: readonly string[];
|
|
3688
|
-
TSCallSignatureDeclaration: readonly string[];
|
|
3689
|
-
TSClassImplements: readonly string[];
|
|
3690
|
-
TSConditionalType: readonly string[];
|
|
3691
|
-
TSConstructSignatureDeclaration: readonly string[];
|
|
3692
|
-
TSConstructorType: readonly string[];
|
|
3693
|
-
TSDeclareFunction: readonly string[];
|
|
3694
|
-
TSEmptyBodyFunctionExpression: readonly string[];
|
|
3695
|
-
TSEnumBody: readonly string[];
|
|
3696
|
-
TSEnumDeclaration: readonly string[];
|
|
3697
|
-
TSEnumMember: readonly string[];
|
|
3698
|
-
TSExportAssignment: readonly string[];
|
|
3699
|
-
TSExternalModuleReference: readonly string[];
|
|
3700
|
-
TSFunctionType: readonly string[];
|
|
3701
|
-
TSImportEqualsDeclaration: readonly string[];
|
|
3702
|
-
TSImportType: readonly string[];
|
|
3703
|
-
TSIndexSignature: readonly string[];
|
|
3704
|
-
TSIndexedAccessType: readonly string[];
|
|
3705
|
-
TSInferType: readonly string[];
|
|
3706
|
-
TSInstantiationExpression: readonly string[];
|
|
3707
|
-
TSInterfaceBody: readonly string[];
|
|
3708
|
-
TSInterfaceDeclaration: readonly string[];
|
|
3709
|
-
TSInterfaceHeritage: readonly string[];
|
|
3710
|
-
TSIntersectionType: readonly string[];
|
|
3711
|
-
TSJSDocNonNullableType: readonly string[];
|
|
3712
|
-
TSJSDocNullableType: readonly string[];
|
|
3713
|
-
TSLiteralType: readonly string[];
|
|
3714
|
-
TSMappedType: readonly string[];
|
|
3715
|
-
TSMethodSignature: readonly string[];
|
|
3716
|
-
TSModuleBlock: readonly string[];
|
|
3717
|
-
TSModuleDeclaration: readonly string[];
|
|
3718
|
-
TSNamedTupleMember: readonly string[];
|
|
3719
|
-
TSNamespaceExportDeclaration: readonly string[];
|
|
3720
|
-
TSNonNullExpression: readonly string[];
|
|
3721
|
-
TSOptionalType: readonly string[];
|
|
3722
|
-
TSParameterProperty: readonly string[];
|
|
3723
|
-
TSParenthesizedType: readonly string[];
|
|
3724
|
-
TSPropertySignature: readonly string[];
|
|
3725
|
-
TSQualifiedName: readonly string[];
|
|
3726
|
-
TSRestType: readonly string[];
|
|
3727
|
-
TSSatisfiesExpression: readonly string[];
|
|
3728
|
-
TSTemplateLiteralType: readonly string[];
|
|
3729
|
-
TSTupleType: readonly string[];
|
|
3730
|
-
TSTypeAliasDeclaration: readonly string[];
|
|
3731
|
-
TSTypeAnnotation: readonly string[];
|
|
3732
|
-
TSTypeAssertion: readonly string[];
|
|
3733
|
-
TSTypeLiteral: readonly string[];
|
|
3734
|
-
TSTypeOperator: readonly string[];
|
|
3735
|
-
TSTypeParameter: readonly string[];
|
|
3736
|
-
TSTypeParameterDeclaration: readonly string[];
|
|
3737
|
-
TSTypeParameterInstantiation: readonly string[];
|
|
3738
|
-
TSTypePredicate: readonly string[];
|
|
3739
|
-
TSTypeQuery: readonly string[];
|
|
3740
|
-
TSTypeReference: readonly string[];
|
|
3741
|
-
TSUnionType: readonly string[];
|
|
3742
|
-
}>;
|
|
3743
|
-
/**
|
|
3744
|
-
* Ast node types.
|
|
3745
|
-
*/
|
|
3746
|
-
readonly Syntax: Readonly<Record<string, string>>;
|
|
3747
|
-
/**
|
|
3748
|
-
* Latest ECMAScript version supported by parser.
|
|
3749
|
-
*/
|
|
3750
|
-
latestEcmaVersion: 17;
|
|
3751
|
-
/**
|
|
3752
|
-
* ECMAScript versions supported by parser.
|
|
3753
|
-
*/
|
|
3754
|
-
supportedEcmaVersions: readonly number[];
|
|
3755
|
-
}>;
|
|
3756
|
-
/**
|
|
3757
|
-
* Parser options used to parse the file being linted.
|
|
3758
|
-
*/
|
|
3759
|
-
parserOptions: Readonly<{
|
|
3760
|
-
/**
|
|
3761
|
-
* Source type of the file being linted.
|
|
3762
|
-
*/
|
|
3763
|
-
readonly sourceType: ModuleKind;
|
|
3764
|
-
/**
|
|
3765
|
-
* ECMA features.
|
|
3766
|
-
*/
|
|
3767
|
-
ecmaFeatures: Readonly<{
|
|
3768
|
-
/**
|
|
3769
|
-
* `true` if file was parsed as JSX.
|
|
3770
|
-
*/
|
|
3771
|
-
readonly jsx: boolean;
|
|
3772
|
-
/**
|
|
3773
|
-
* `true` if file was parsed with top-level `return` statements allowed.
|
|
3774
|
-
*/
|
|
3775
|
-
readonly globalReturn: boolean;
|
|
3776
|
-
/**
|
|
3777
|
-
* `true` if file was parsed as strict mode code.
|
|
3778
|
-
*/
|
|
3779
|
-
readonly impliedStrict: boolean;
|
|
3780
|
-
}>;
|
|
3781
|
-
}>;
|
|
3782
|
-
/**
|
|
3783
|
-
* Globals defined for the file being linted.
|
|
3784
|
-
*/
|
|
3785
|
-
readonly globals: Readonly<Globals$1>;
|
|
3786
|
-
/**
|
|
3787
|
-
* Environments defined for the file being linted.
|
|
3788
|
-
*/
|
|
3789
|
-
readonly env: Readonly<Envs$1>;
|
|
3790
|
-
}>;
|
|
3842
|
+
readonly languageOptions: LanguageOptions$1;
|
|
3791
3843
|
/**
|
|
3792
3844
|
* Settings for the file being linted.
|
|
3793
3845
|
*/
|
|
3794
|
-
readonly settings: Readonly<
|
|
3846
|
+
readonly settings: Readonly<Settings>;
|
|
3795
3847
|
/**
|
|
3796
3848
|
* Create a new object with the current object as the prototype and
|
|
3797
3849
|
* the specified properties as its own properties.
|
|
@@ -4010,14 +4062,6 @@ interface CreateOnceRule {
|
|
|
4010
4062
|
createOnce: (context: Context) => VisitorWithHooks;
|
|
4011
4063
|
}
|
|
4012
4064
|
//#endregion
|
|
4013
|
-
//#region src-js/plugins/settings.d.ts
|
|
4014
|
-
/**
|
|
4015
|
-
* Settings for the file being linted.
|
|
4016
|
-
*
|
|
4017
|
-
* Settings are deserialized from JSON, so can only contain JSON-compatible values.
|
|
4018
|
-
*/
|
|
4019
|
-
type Settings = JsonObject;
|
|
4020
|
-
//#endregion
|
|
4021
4065
|
//#region src-js/package/rule_tester.d.ts
|
|
4022
4066
|
type DescribeFn = (text: string, fn: () => void) => void;
|
|
4023
4067
|
type ItFn = ((text: string, fn: () => void) => void) & {
|
|
@@ -4185,7 +4229,7 @@ interface TestCases {
|
|
|
4185
4229
|
/**
|
|
4186
4230
|
* Utility class for testing rules.
|
|
4187
4231
|
*/
|
|
4188
|
-
declare class RuleTester {
|
|
4232
|
+
export declare class RuleTester {
|
|
4189
4233
|
#private;
|
|
4190
4234
|
/**
|
|
4191
4235
|
* Creates a new instance of RuleTester.
|
|
@@ -4246,7 +4290,7 @@ type _InvalidTestCase = InvalidTestCase;
|
|
|
4246
4290
|
type _TestCases = TestCases;
|
|
4247
4291
|
type _Error = Error;
|
|
4248
4292
|
type _ErrorSuggestion = ErrorSuggestion;
|
|
4249
|
-
declare namespace RuleTester {
|
|
4293
|
+
export declare namespace RuleTester {
|
|
4250
4294
|
type Config = _Config;
|
|
4251
4295
|
type LanguageOptions = _LanguageOptions;
|
|
4252
4296
|
type Globals = _Globals;
|
|
@@ -4263,5 +4307,4 @@ declare namespace RuleTester {
|
|
|
4263
4307
|
type Error = _Error;
|
|
4264
4308
|
type ErrorSuggestion = _ErrorSuggestion;
|
|
4265
4309
|
}
|
|
4266
|
-
//#endregion
|
|
4267
|
-
export { RuleTester };
|
|
4310
|
+
//#endregion
|