oxlint 1.82.0 → 1.84.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.
@@ -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,467 +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
- declare namespace location_d_exports {
1243
- export { LineColumn, Location, Range, Ranged, Span, computeLoc, debugAssertLinesIsInitialized, getLineColumnFromOffset, getLoc, getNodeByRangeIndex, getNodeLoc, getOffsetFromLineColumn, getRange, initLines, lineStartIndices, lines, resetLinesAndLocs };
1244
- }
1245
- /**
1246
- * Range of source offsets.
1247
- */
1248
- type Range = [number, number];
1249
- /**
1250
- * Interface for any type which has `range` field.
1251
- */
1252
- interface Ranged {
1253
- range: Range;
1254
- }
1255
- /**
1256
- * Interface for any type which has location properties.
1257
- */
1258
- interface Span extends Ranged {
1259
- start: number;
1260
- end: number;
1261
- loc: Location;
1262
- }
1263
- /**
1264
- * Source code location.
1265
- */
1266
- interface Location {
1267
- start: LineColumn;
1268
- end: LineColumn;
1269
- }
1270
- /**
1271
- * Line number + column number pair.
1272
- * `line` is 1-indexed, `column` is 0-indexed.
1273
- */
1274
- interface LineColumn {
1275
- line: number;
1276
- column: number;
1277
- }
1278
- declare const lines: string[];
1279
- declare const lineStartIndices: number[];
1280
- /**
1281
- * Split source text into lines.
1282
- */
1283
- declare function initLines(): void;
1284
- /**
1285
- * Debug assert that `lines` and `lineStartIndices` are initialized.
1286
- * No-op in release build - TSDown will remove this function and all calls to it.
1287
- */
1288
- declare function debugAssertLinesIsInitialized(): void;
1289
- /**
1290
- * Reset lines after file has been linted, to free memory.
1291
- * Reset `Location` object pool.
1292
- */
1293
- declare function resetLinesAndLocs(): void;
1294
- /**
1295
- * Convert a source text index into a (line, column) pair.
1296
- * @param offset - The index of a character in a file.
1297
- * @returns `{line, column}` location object with 1-indexed line and 0-indexed column.
1298
- * @throws {TypeError|RangeError} If non-numeric `offset`, or `offset` out of range.
1299
- */
1300
- declare function getLineColumnFromOffset(offset: number): LineColumn;
1301
- /**
1302
- * Convert a `{ line, column }` pair into a range index.
1303
- * @param loc - A line/column location.
1304
- * @returns The character index of the location in the file.
1305
- * @throws {TypeError|RangeError} If `loc` is not an object with a numeric `line` and `column`,
1306
- * or if the `line` is less than or equal to zero, or the line or column is out of the expected range.
1307
- */
1308
- declare function getOffsetFromLineColumn(loc: LineColumn): number;
1309
- /**
1310
- * Get the range of the given node or token.
1311
- * @param nodeOrToken - Node or token to get the range of
1312
- * @returns Range of the node or token
1313
- */
1314
- declare function getRange(nodeOrToken: NodeOrToken): Range;
1315
- /**
1316
- * Get the location of the given node or token.
1317
- * @param nodeOrToken - Node or token to get the location of
1318
- * @returns Location of the node or token
1319
- */
1320
- declare function getLoc(nodeOrToken: NodeOrToken): Location;
1321
- /**
1322
- * Calculate the `Location` for an AST node, and cache it on the node.
1323
- *
1324
- * Used in `loc` getter on AST nodes (not tokens or comments - they use their own caching
1325
- * via `Token` / `Comment` class private fields).
1326
- *
1327
- * Defines a `loc` property on the node with the calculated `Location`, so accessing `loc` twice on same node
1328
- * results in the same object each time.
1329
- *
1330
- * For internal use only.
1331
- *
1332
- * @param node - AST node
1333
- * @returns Location
1334
- */
1335
- declare function getNodeLoc(node: Node$1): Location;
1336
- /**
1337
- * Compute a `Location` from `start` and `end` source offsets.
1338
- *
1339
- * Returns a recycled `Location` object from the pool when possible, allocating only during warmup.
1340
- * Initializes `lines` and `lineStartIndices` tables if they haven't been already.
1341
- *
1342
- * @param start - Start offset
1343
- * @param end - End offset
1344
- * @returns Location
1345
- */
1346
- declare function computeLoc(start: number, end: number): Location;
1347
- /**
1348
- * Get the deepest node containing a range index.
1349
- * @param offset - Range index of the desired node
1350
- * @returns The node if found, or `null` if not found
1351
- */
1352
- declare function getNodeByRangeIndex(offset: number): Node | null;
1353
- //#endregion
1354
1135
  //#region src-js/plugins/comments.d.ts
1355
1136
  /**
1356
1137
  * Comment.
@@ -1360,7 +1141,7 @@ interface CommentType extends Span {
1360
1141
  value: string;
1361
1142
  }
1362
1143
  declare namespace types_d_exports {
1363
- 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, 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 };
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 };
1364
1145
  }
1365
1146
  interface Program extends Span {
1366
1147
  type: "Program";
@@ -1377,7 +1158,7 @@ interface IdentifierName extends Span {
1377
1158
  name: string;
1378
1159
  optional?: false;
1379
1160
  typeAnnotation?: null;
1380
- parent: Node;
1161
+ parent: Node$1;
1381
1162
  }
1382
1163
  interface IdentifierReference extends Span {
1383
1164
  type: "Identifier";
@@ -1385,7 +1166,7 @@ interface IdentifierReference extends Span {
1385
1166
  name: string;
1386
1167
  optional?: false;
1387
1168
  typeAnnotation?: null;
1388
- parent: Node;
1169
+ parent: Node$1;
1389
1170
  }
1390
1171
  interface BindingIdentifier extends Span {
1391
1172
  type: "Identifier";
@@ -1393,7 +1174,7 @@ interface BindingIdentifier extends Span {
1393
1174
  name: string;
1394
1175
  optional?: false;
1395
1176
  typeAnnotation?: TSTypeAnnotation | null;
1396
- parent: Node;
1177
+ parent: Node$1;
1397
1178
  }
1398
1179
  interface LabelIdentifier extends Span {
1399
1180
  type: "Identifier";
@@ -1401,22 +1182,22 @@ interface LabelIdentifier extends Span {
1401
1182
  name: string;
1402
1183
  optional?: false;
1403
1184
  typeAnnotation?: null;
1404
- parent: Node;
1185
+ parent: Node$1;
1405
1186
  }
1406
1187
  interface ThisExpression extends Span {
1407
1188
  type: "ThisExpression";
1408
- parent: Node;
1189
+ parent: Node$1;
1409
1190
  }
1410
1191
  interface ArrayExpression extends Span {
1411
1192
  type: "ArrayExpression";
1412
1193
  elements: Array<ArrayExpressionElement>;
1413
- parent: Node;
1194
+ parent: Node$1;
1414
1195
  }
1415
1196
  type ArrayExpressionElement = SpreadElement | null | Expression;
1416
1197
  interface ObjectExpression extends Span {
1417
1198
  type: "ObjectExpression";
1418
1199
  properties: Array<ObjectPropertyKind>;
1419
- parent: Node;
1200
+ parent: Node$1;
1420
1201
  }
1421
1202
  type ObjectPropertyKind = ObjectProperty | SpreadElement;
1422
1203
  interface ObjectProperty extends Span {
@@ -1428,7 +1209,7 @@ interface ObjectProperty extends Span {
1428
1209
  shorthand: boolean;
1429
1210
  computed: boolean;
1430
1211
  optional?: false;
1431
- parent: Node;
1212
+ parent: Node$1;
1432
1213
  }
1433
1214
  type PropertyKey$1 = IdentifierName | PrivateIdentifier | Expression;
1434
1215
  type PropertyKind = "init" | "get" | "set";
@@ -1436,20 +1217,20 @@ interface TemplateLiteral extends Span {
1436
1217
  type: "TemplateLiteral";
1437
1218
  quasis: Array<TemplateElement>;
1438
1219
  expressions: Array<Expression>;
1439
- parent: Node;
1220
+ parent: Node$1;
1440
1221
  }
1441
1222
  interface TaggedTemplateExpression extends Span {
1442
1223
  type: "TaggedTemplateExpression";
1443
1224
  tag: Expression;
1444
1225
  typeArguments?: TSTypeParameterInstantiation | null;
1445
1226
  quasi: TemplateLiteral;
1446
- parent: Node;
1227
+ parent: Node$1;
1447
1228
  }
1448
1229
  interface TemplateElement extends Span {
1449
1230
  type: "TemplateElement";
1450
1231
  value: TemplateElementValue;
1451
1232
  tail: boolean;
1452
- parent: Node;
1233
+ parent: Node$1;
1453
1234
  }
1454
1235
  interface TemplateElementValue {
1455
1236
  raw: string;
@@ -1462,7 +1243,7 @@ interface ComputedMemberExpression extends Span {
1462
1243
  property: Expression;
1463
1244
  optional: boolean;
1464
1245
  computed: true;
1465
- parent: Node;
1246
+ parent: Node$1;
1466
1247
  }
1467
1248
  interface StaticMemberExpression extends Span {
1468
1249
  type: "MemberExpression";
@@ -1470,7 +1251,7 @@ interface StaticMemberExpression extends Span {
1470
1251
  property: IdentifierName;
1471
1252
  optional: boolean;
1472
1253
  computed: false;
1473
- parent: Node;
1254
+ parent: Node$1;
1474
1255
  }
1475
1256
  interface PrivateFieldExpression extends Span {
1476
1257
  type: "MemberExpression";
@@ -1478,7 +1259,7 @@ interface PrivateFieldExpression extends Span {
1478
1259
  property: PrivateIdentifier;
1479
1260
  optional: boolean;
1480
1261
  computed: false;
1481
- parent: Node;
1262
+ parent: Node$1;
1482
1263
  }
1483
1264
  interface CallExpression extends Span {
1484
1265
  type: "CallExpression";
@@ -1486,25 +1267,25 @@ interface CallExpression extends Span {
1486
1267
  typeArguments?: TSTypeParameterInstantiation | null;
1487
1268
  arguments: Array<Argument>;
1488
1269
  optional: boolean;
1489
- parent: Node;
1270
+ parent: Node$1;
1490
1271
  }
1491
1272
  interface NewExpression extends Span {
1492
1273
  type: "NewExpression";
1493
1274
  callee: Expression;
1494
1275
  typeArguments?: TSTypeParameterInstantiation | null;
1495
1276
  arguments: Array<Argument>;
1496
- parent: Node;
1277
+ parent: Node$1;
1497
1278
  }
1498
1279
  interface MetaProperty extends Span {
1499
1280
  type: "MetaProperty";
1500
1281
  meta: IdentifierName;
1501
1282
  property: IdentifierName;
1502
- parent: Node;
1283
+ parent: Node$1;
1503
1284
  }
1504
1285
  interface SpreadElement extends Span {
1505
1286
  type: "SpreadElement";
1506
1287
  argument: Expression;
1507
- parent: Node;
1288
+ parent: Node$1;
1508
1289
  }
1509
1290
  type Argument = SpreadElement | Expression;
1510
1291
  interface UpdateExpression extends Span {
@@ -1512,49 +1293,49 @@ interface UpdateExpression extends Span {
1512
1293
  operator: UpdateOperator;
1513
1294
  prefix: boolean;
1514
1295
  argument: SimpleAssignmentTarget;
1515
- parent: Node;
1296
+ parent: Node$1;
1516
1297
  }
1517
1298
  interface UnaryExpression extends Span {
1518
1299
  type: "UnaryExpression";
1519
1300
  operator: UnaryOperator;
1520
1301
  argument: Expression;
1521
1302
  prefix: true;
1522
- parent: Node;
1303
+ parent: Node$1;
1523
1304
  }
1524
1305
  interface BinaryExpression extends Span {
1525
1306
  type: "BinaryExpression";
1526
1307
  left: Expression;
1527
1308
  operator: BinaryOperator;
1528
1309
  right: Expression;
1529
- parent: Node;
1310
+ parent: Node$1;
1530
1311
  }
1531
1312
  interface PrivateInExpression extends Span {
1532
1313
  type: "BinaryExpression";
1533
1314
  left: PrivateIdentifier;
1534
1315
  operator: "in";
1535
1316
  right: Expression;
1536
- parent: Node;
1317
+ parent: Node$1;
1537
1318
  }
1538
1319
  interface LogicalExpression extends Span {
1539
1320
  type: "LogicalExpression";
1540
1321
  left: Expression;
1541
1322
  operator: LogicalOperator;
1542
1323
  right: Expression;
1543
- parent: Node;
1324
+ parent: Node$1;
1544
1325
  }
1545
1326
  interface ConditionalExpression extends Span {
1546
1327
  type: "ConditionalExpression";
1547
1328
  test: Expression;
1548
1329
  consequent: Expression;
1549
1330
  alternate: Expression;
1550
- parent: Node;
1331
+ parent: Node$1;
1551
1332
  }
1552
1333
  interface AssignmentExpression extends Span {
1553
1334
  type: "AssignmentExpression";
1554
1335
  operator: AssignmentOperator;
1555
1336
  left: AssignmentTarget;
1556
1337
  right: Expression;
1557
- parent: Node;
1338
+ parent: Node$1;
1558
1339
  }
1559
1340
  type AssignmentTarget = SimpleAssignmentTarget | AssignmentTargetPattern;
1560
1341
  type SimpleAssignmentTarget = IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | MemberExpression;
@@ -1565,7 +1346,7 @@ interface ArrayAssignmentTarget extends Span {
1565
1346
  elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
1566
1347
  optional?: false;
1567
1348
  typeAnnotation?: null;
1568
- parent: Node;
1349
+ parent: Node$1;
1569
1350
  }
1570
1351
  interface ObjectAssignmentTarget extends Span {
1571
1352
  type: "ObjectPattern";
@@ -1573,7 +1354,7 @@ interface ObjectAssignmentTarget extends Span {
1573
1354
  properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
1574
1355
  optional?: false;
1575
1356
  typeAnnotation?: null;
1576
- parent: Node;
1357
+ parent: Node$1;
1577
1358
  }
1578
1359
  interface AssignmentTargetRest extends Span {
1579
1360
  type: "RestElement";
@@ -1582,7 +1363,7 @@ interface AssignmentTargetRest extends Span {
1582
1363
  optional?: false;
1583
1364
  typeAnnotation?: null;
1584
1365
  value?: null;
1585
- parent: Node;
1366
+ parent: Node$1;
1586
1367
  }
1587
1368
  type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
1588
1369
  interface AssignmentTargetWithDefault extends Span {
@@ -1592,7 +1373,7 @@ interface AssignmentTargetWithDefault extends Span {
1592
1373
  right: Expression;
1593
1374
  optional?: false;
1594
1375
  typeAnnotation?: null;
1595
- parent: Node;
1376
+ parent: Node$1;
1596
1377
  }
1597
1378
  type AssignmentTargetProperty = AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty;
1598
1379
  interface AssignmentTargetPropertyIdentifier extends Span {
@@ -1604,7 +1385,7 @@ interface AssignmentTargetPropertyIdentifier extends Span {
1604
1385
  shorthand: true;
1605
1386
  computed: false;
1606
1387
  optional?: false;
1607
- parent: Node;
1388
+ parent: Node$1;
1608
1389
  }
1609
1390
  interface AssignmentTargetPropertyProperty extends Span {
1610
1391
  type: "Property";
@@ -1615,49 +1396,49 @@ interface AssignmentTargetPropertyProperty extends Span {
1615
1396
  shorthand: false;
1616
1397
  computed: boolean;
1617
1398
  optional?: false;
1618
- parent: Node;
1399
+ parent: Node$1;
1619
1400
  }
1620
1401
  interface SequenceExpression extends Span {
1621
1402
  type: "SequenceExpression";
1622
1403
  expressions: Array<Expression>;
1623
- parent: Node;
1404
+ parent: Node$1;
1624
1405
  }
1625
1406
  interface Super extends Span {
1626
1407
  type: "Super";
1627
- parent: Node;
1408
+ parent: Node$1;
1628
1409
  }
1629
1410
  interface AwaitExpression extends Span {
1630
1411
  type: "AwaitExpression";
1631
1412
  argument: Expression;
1632
- parent: Node;
1413
+ parent: Node$1;
1633
1414
  }
1634
1415
  interface ChainExpression extends Span {
1635
1416
  type: "ChainExpression";
1636
1417
  expression: ChainElement;
1637
- parent: Node;
1418
+ parent: Node$1;
1638
1419
  }
1639
1420
  type ChainElement = CallExpression | TSNonNullExpression | MemberExpression;
1640
1421
  interface ParenthesizedExpression extends Span {
1641
1422
  type: "ParenthesizedExpression";
1642
1423
  expression: Expression;
1643
- parent: Node;
1424
+ parent: Node$1;
1644
1425
  }
1645
1426
  type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | WithStatement | Declaration | ModuleDeclaration;
1646
1427
  interface Directive$1 extends Span {
1647
1428
  type: "ExpressionStatement";
1648
1429
  expression: StringLiteral;
1649
1430
  directive: string;
1650
- parent: Node;
1431
+ parent: Node$1;
1651
1432
  }
1652
1433
  interface Hashbang extends Span {
1653
1434
  type: "Hashbang";
1654
1435
  value: string;
1655
- parent: Node;
1436
+ parent: Node$1;
1656
1437
  }
1657
1438
  interface BlockStatement extends Span {
1658
1439
  type: "BlockStatement";
1659
1440
  body: Array<Statement>;
1660
- parent: Node;
1441
+ parent: Node$1;
1661
1442
  }
1662
1443
  type Declaration = VariableDeclaration | Function$1 | Class | TSTypeAliasDeclaration | TSInterfaceDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSGlobalDeclaration | TSImportEqualsDeclaration;
1663
1444
  interface VariableDeclaration extends Span {
@@ -1665,7 +1446,7 @@ interface VariableDeclaration extends Span {
1665
1446
  kind: VariableDeclarationKind;
1666
1447
  declarations: Array<VariableDeclarator>;
1667
1448
  declare?: boolean;
1668
- parent: Node;
1449
+ parent: Node$1;
1669
1450
  }
1670
1451
  type VariableDeclarationKind = "var" | "let" | "const" | "using" | "await using";
1671
1452
  interface VariableDeclarator extends Span {
@@ -1673,36 +1454,36 @@ interface VariableDeclarator extends Span {
1673
1454
  id: BindingPattern;
1674
1455
  init: Expression | null;
1675
1456
  definite?: boolean;
1676
- parent: Node;
1457
+ parent: Node$1;
1677
1458
  }
1678
1459
  interface EmptyStatement extends Span {
1679
1460
  type: "EmptyStatement";
1680
- parent: Node;
1461
+ parent: Node$1;
1681
1462
  }
1682
1463
  interface ExpressionStatement extends Span {
1683
1464
  type: "ExpressionStatement";
1684
1465
  expression: Expression;
1685
1466
  directive?: string | null;
1686
- parent: Node;
1467
+ parent: Node$1;
1687
1468
  }
1688
1469
  interface IfStatement extends Span {
1689
1470
  type: "IfStatement";
1690
1471
  test: Expression;
1691
1472
  consequent: Statement;
1692
1473
  alternate: Statement | null;
1693
- parent: Node;
1474
+ parent: Node$1;
1694
1475
  }
1695
1476
  interface DoWhileStatement extends Span {
1696
1477
  type: "DoWhileStatement";
1697
1478
  body: Statement;
1698
1479
  test: Expression;
1699
- parent: Node;
1480
+ parent: Node$1;
1700
1481
  }
1701
1482
  interface WhileStatement extends Span {
1702
1483
  type: "WhileStatement";
1703
1484
  test: Expression;
1704
1485
  body: Statement;
1705
- parent: Node;
1486
+ parent: Node$1;
1706
1487
  }
1707
1488
  interface ForStatement extends Span {
1708
1489
  type: "ForStatement";
@@ -1710,7 +1491,7 @@ interface ForStatement extends Span {
1710
1491
  test: Expression | null;
1711
1492
  update: Expression | null;
1712
1493
  body: Statement;
1713
- parent: Node;
1494
+ parent: Node$1;
1714
1495
  }
1715
1496
  type ForStatementInit = VariableDeclaration | Expression;
1716
1497
  interface ForInStatement extends Span {
@@ -1718,7 +1499,7 @@ interface ForInStatement extends Span {
1718
1499
  left: ForStatementLeft;
1719
1500
  right: Expression;
1720
1501
  body: Statement;
1721
- parent: Node;
1502
+ parent: Node$1;
1722
1503
  }
1723
1504
  type ForStatementLeft = VariableDeclaration | AssignmentTarget;
1724
1505
  interface ForOfStatement extends Span {
@@ -1727,68 +1508,68 @@ interface ForOfStatement extends Span {
1727
1508
  left: ForStatementLeft;
1728
1509
  right: Expression;
1729
1510
  body: Statement;
1730
- parent: Node;
1511
+ parent: Node$1;
1731
1512
  }
1732
1513
  interface ContinueStatement extends Span {
1733
1514
  type: "ContinueStatement";
1734
1515
  label: LabelIdentifier | null;
1735
- parent: Node;
1516
+ parent: Node$1;
1736
1517
  }
1737
1518
  interface BreakStatement extends Span {
1738
1519
  type: "BreakStatement";
1739
1520
  label: LabelIdentifier | null;
1740
- parent: Node;
1521
+ parent: Node$1;
1741
1522
  }
1742
1523
  interface ReturnStatement extends Span {
1743
1524
  type: "ReturnStatement";
1744
1525
  argument: Expression | null;
1745
- parent: Node;
1526
+ parent: Node$1;
1746
1527
  }
1747
1528
  interface WithStatement extends Span {
1748
1529
  type: "WithStatement";
1749
1530
  object: Expression;
1750
1531
  body: Statement;
1751
- parent: Node;
1532
+ parent: Node$1;
1752
1533
  }
1753
1534
  interface SwitchStatement extends Span {
1754
1535
  type: "SwitchStatement";
1755
1536
  discriminant: Expression;
1756
1537
  cases: Array<SwitchCase>;
1757
- parent: Node;
1538
+ parent: Node$1;
1758
1539
  }
1759
1540
  interface SwitchCase extends Span {
1760
1541
  type: "SwitchCase";
1761
1542
  test: Expression | null;
1762
1543
  consequent: Array<Statement>;
1763
- parent: Node;
1544
+ parent: Node$1;
1764
1545
  }
1765
1546
  interface LabeledStatement extends Span {
1766
1547
  type: "LabeledStatement";
1767
1548
  label: LabelIdentifier;
1768
1549
  body: Statement;
1769
- parent: Node;
1550
+ parent: Node$1;
1770
1551
  }
1771
1552
  interface ThrowStatement extends Span {
1772
1553
  type: "ThrowStatement";
1773
1554
  argument: Expression;
1774
- parent: Node;
1555
+ parent: Node$1;
1775
1556
  }
1776
1557
  interface TryStatement extends Span {
1777
1558
  type: "TryStatement";
1778
1559
  block: BlockStatement;
1779
1560
  handler: CatchClause | null;
1780
1561
  finalizer: BlockStatement | null;
1781
- parent: Node;
1562
+ parent: Node$1;
1782
1563
  }
1783
1564
  interface CatchClause extends Span {
1784
1565
  type: "CatchClause";
1785
1566
  param: BindingPattern | null;
1786
1567
  body: BlockStatement;
1787
- parent: Node;
1568
+ parent: Node$1;
1788
1569
  }
1789
1570
  interface DebuggerStatement extends Span {
1790
1571
  type: "DebuggerStatement";
1791
- parent: Node;
1572
+ parent: Node$1;
1792
1573
  }
1793
1574
  type BindingPattern = BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern;
1794
1575
  interface AssignmentPattern extends Span {
@@ -1798,7 +1579,7 @@ interface AssignmentPattern extends Span {
1798
1579
  right: Expression;
1799
1580
  optional?: false;
1800
1581
  typeAnnotation?: null;
1801
- parent: Node;
1582
+ parent: Node$1;
1802
1583
  }
1803
1584
  interface ObjectPattern extends Span {
1804
1585
  type: "ObjectPattern";
@@ -1806,7 +1587,7 @@ interface ObjectPattern extends Span {
1806
1587
  properties: Array<BindingProperty | BindingRestElement>;
1807
1588
  optional?: false;
1808
1589
  typeAnnotation?: TSTypeAnnotation | null;
1809
- parent: Node;
1590
+ parent: Node$1;
1810
1591
  }
1811
1592
  interface BindingProperty extends Span {
1812
1593
  type: "Property";
@@ -1817,7 +1598,7 @@ interface BindingProperty extends Span {
1817
1598
  shorthand: boolean;
1818
1599
  computed: boolean;
1819
1600
  optional?: false;
1820
- parent: Node;
1601
+ parent: Node$1;
1821
1602
  }
1822
1603
  interface ArrayPattern extends Span {
1823
1604
  type: "ArrayPattern";
@@ -1825,7 +1606,7 @@ interface ArrayPattern extends Span {
1825
1606
  elements: Array<BindingPattern | BindingRestElement | null>;
1826
1607
  optional?: false;
1827
1608
  typeAnnotation?: TSTypeAnnotation | null;
1828
- parent: Node;
1609
+ parent: Node$1;
1829
1610
  }
1830
1611
  interface BindingRestElement extends Span {
1831
1612
  type: "RestElement";
@@ -1834,7 +1615,7 @@ interface BindingRestElement extends Span {
1834
1615
  optional?: false;
1835
1616
  typeAnnotation?: TSTypeAnnotation | null;
1836
1617
  value?: null;
1837
- parent: Node;
1618
+ parent: Node$1;
1838
1619
  }
1839
1620
  interface Function$1 extends Span {
1840
1621
  type: FunctionType;
@@ -1847,7 +1628,7 @@ interface Function$1 extends Span {
1847
1628
  returnType?: TSTypeAnnotation | null;
1848
1629
  body: FunctionBody | null;
1849
1630
  expression: false;
1850
- parent: Node;
1631
+ parent: Node$1;
1851
1632
  }
1852
1633
  type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest;
1853
1634
  type FunctionType = "FunctionDeclaration" | "FunctionExpression" | "TSDeclareFunction" | "TSEmptyBodyFunctionExpression";
@@ -1858,7 +1639,7 @@ interface FormalParameterRest extends Span {
1858
1639
  optional?: boolean;
1859
1640
  typeAnnotation?: TSTypeAnnotation | null;
1860
1641
  value?: null;
1861
- parent: Node;
1642
+ parent: Node$1;
1862
1643
  }
1863
1644
  type FormalParameter = {
1864
1645
  decorators?: Array<Decorator>;
@@ -1871,12 +1652,12 @@ interface TSParameterProperty extends Span {
1871
1652
  parameter: FormalParameter;
1872
1653
  readonly: boolean;
1873
1654
  static: boolean;
1874
- parent: Node;
1655
+ parent: Node$1;
1875
1656
  }
1876
1657
  interface FunctionBody extends Span {
1877
1658
  type: "BlockStatement";
1878
1659
  body: Array<Directive$1 | Statement>;
1879
- parent: Node;
1660
+ parent: Node$1;
1880
1661
  }
1881
1662
  interface ArrowFunctionExpression extends Span {
1882
1663
  type: "ArrowFunctionExpression";
@@ -1888,13 +1669,13 @@ interface ArrowFunctionExpression extends Span {
1888
1669
  body: FunctionBody | Expression;
1889
1670
  id: null;
1890
1671
  generator: false;
1891
- parent: Node;
1672
+ parent: Node$1;
1892
1673
  }
1893
1674
  interface YieldExpression extends Span {
1894
1675
  type: "YieldExpression";
1895
1676
  delegate: boolean;
1896
1677
  argument: Expression | null;
1897
- parent: Node;
1678
+ parent: Node$1;
1898
1679
  }
1899
1680
  interface Class extends Span {
1900
1681
  type: ClassType;
@@ -1907,13 +1688,13 @@ interface Class extends Span {
1907
1688
  body: ClassBody;
1908
1689
  abstract?: boolean;
1909
1690
  declare?: boolean;
1910
- parent: Node;
1691
+ parent: Node$1;
1911
1692
  }
1912
1693
  type ClassType = "ClassDeclaration" | "ClassExpression";
1913
1694
  interface ClassBody extends Span {
1914
1695
  type: "ClassBody";
1915
1696
  body: Array<ClassElement>;
1916
- parent: Node;
1697
+ parent: Node$1;
1917
1698
  }
1918
1699
  type ClassElement = StaticBlock | MethodDefinition | PropertyDefinition | AccessorProperty | TSIndexSignature;
1919
1700
  interface MethodDefinition extends Span {
@@ -1927,7 +1708,7 @@ interface MethodDefinition extends Span {
1927
1708
  override?: boolean;
1928
1709
  optional?: boolean;
1929
1710
  accessibility?: TSAccessibility | null;
1930
- parent: Node;
1711
+ parent: Node$1;
1931
1712
  }
1932
1713
  type MethodDefinitionType = "MethodDefinition" | "TSAbstractMethodDefinition";
1933
1714
  interface PropertyDefinition extends Span {
@@ -1944,19 +1725,19 @@ interface PropertyDefinition extends Span {
1944
1725
  definite?: boolean;
1945
1726
  readonly?: boolean;
1946
1727
  accessibility?: TSAccessibility | null;
1947
- parent: Node;
1728
+ parent: Node$1;
1948
1729
  }
1949
1730
  type PropertyDefinitionType = "PropertyDefinition" | "TSAbstractPropertyDefinition";
1950
1731
  type MethodDefinitionKind = "constructor" | "method" | "get" | "set";
1951
1732
  interface PrivateIdentifier extends Span {
1952
1733
  type: "PrivateIdentifier";
1953
1734
  name: string;
1954
- parent: Node;
1735
+ parent: Node$1;
1955
1736
  }
1956
1737
  interface StaticBlock extends Span {
1957
1738
  type: "StaticBlock";
1958
1739
  body: Array<Statement>;
1959
- parent: Node;
1740
+ parent: Node$1;
1960
1741
  }
1961
1742
  type ModuleDeclaration = ImportDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
1962
1743
  type AccessorPropertyType = "AccessorProperty" | "TSAbstractAccessorProperty";
@@ -1974,14 +1755,14 @@ interface AccessorProperty extends Span {
1974
1755
  declare?: false;
1975
1756
  optional?: false;
1976
1757
  readonly?: false;
1977
- parent: Node;
1758
+ parent: Node$1;
1978
1759
  }
1979
1760
  interface ImportExpression extends Span {
1980
1761
  type: "ImportExpression";
1981
1762
  source: Expression;
1982
1763
  options: Expression | null;
1983
1764
  phase: ImportPhase | null;
1984
- parent: Node;
1765
+ parent: Node$1;
1985
1766
  }
1986
1767
  interface ImportDeclaration extends Span {
1987
1768
  type: "ImportDeclaration";
@@ -1990,7 +1771,7 @@ interface ImportDeclaration extends Span {
1990
1771
  phase: ImportPhase | null;
1991
1772
  attributes: Array<ImportAttribute>;
1992
1773
  importKind?: ImportOrExportKind;
1993
- parent: Node;
1774
+ parent: Node$1;
1994
1775
  }
1995
1776
  type ImportPhase = "source" | "defer";
1996
1777
  type ImportDeclarationSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
@@ -1999,23 +1780,23 @@ interface ImportSpecifier extends Span {
1999
1780
  imported: ModuleExportName;
2000
1781
  local: BindingIdentifier;
2001
1782
  importKind?: ImportOrExportKind;
2002
- parent: Node;
1783
+ parent: Node$1;
2003
1784
  }
2004
1785
  interface ImportDefaultSpecifier extends Span {
2005
1786
  type: "ImportDefaultSpecifier";
2006
1787
  local: BindingIdentifier;
2007
- parent: Node;
1788
+ parent: Node$1;
2008
1789
  }
2009
1790
  interface ImportNamespaceSpecifier extends Span {
2010
1791
  type: "ImportNamespaceSpecifier";
2011
1792
  local: BindingIdentifier;
2012
- parent: Node;
1793
+ parent: Node$1;
2013
1794
  }
2014
1795
  interface ImportAttribute extends Span {
2015
1796
  type: "ImportAttribute";
2016
1797
  key: ImportAttributeKey;
2017
1798
  value: StringLiteral;
2018
- parent: Node;
1799
+ parent: Node$1;
2019
1800
  }
2020
1801
  type ImportAttributeKey = IdentifierName | StringLiteral;
2021
1802
  interface ExportNamedDeclaration extends Span {
@@ -2025,13 +1806,13 @@ interface ExportNamedDeclaration extends Span {
2025
1806
  source: StringLiteral | null;
2026
1807
  exportKind?: ImportOrExportKind;
2027
1808
  attributes: Array<ImportAttribute>;
2028
- parent: Node;
1809
+ parent: Node$1;
2029
1810
  }
2030
1811
  interface ExportDefaultDeclaration extends Span {
2031
1812
  type: "ExportDefaultDeclaration";
2032
1813
  declaration: ExportDefaultDeclarationKind;
2033
1814
  exportKind?: "value";
2034
- parent: Node;
1815
+ parent: Node$1;
2035
1816
  }
2036
1817
  interface ExportAllDeclaration extends Span {
2037
1818
  type: "ExportAllDeclaration";
@@ -2039,14 +1820,14 @@ interface ExportAllDeclaration extends Span {
2039
1820
  source: StringLiteral;
2040
1821
  attributes: Array<ImportAttribute>;
2041
1822
  exportKind?: ImportOrExportKind;
2042
- parent: Node;
1823
+ parent: Node$1;
2043
1824
  }
2044
1825
  interface ExportSpecifier extends Span {
2045
1826
  type: "ExportSpecifier";
2046
1827
  local: ModuleExportName;
2047
1828
  exported: ModuleExportName;
2048
1829
  exportKind?: ImportOrExportKind;
2049
- parent: Node;
1830
+ parent: Node$1;
2050
1831
  }
2051
1832
  type ExportDefaultDeclarationKind = Function$1 | Class | TSInterfaceDeclaration | Expression;
2052
1833
  type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;
@@ -2054,38 +1835,38 @@ interface V8IntrinsicExpression extends Span {
2054
1835
  type: "V8IntrinsicExpression";
2055
1836
  name: IdentifierName;
2056
1837
  arguments: Array<Argument>;
2057
- parent: Node;
1838
+ parent: Node$1;
2058
1839
  }
2059
1840
  interface BooleanLiteral extends Span {
2060
1841
  type: "Literal";
2061
1842
  value: boolean;
2062
1843
  raw: string | null;
2063
- parent: Node;
1844
+ parent: Node$1;
2064
1845
  }
2065
1846
  interface NullLiteral extends Span {
2066
1847
  type: "Literal";
2067
1848
  value: null;
2068
1849
  raw: "null" | null;
2069
- parent: Node;
1850
+ parent: Node$1;
2070
1851
  }
2071
1852
  interface NumericLiteral extends Span {
2072
1853
  type: "Literal";
2073
1854
  value: number;
2074
1855
  raw: string | null;
2075
- parent: Node;
1856
+ parent: Node$1;
2076
1857
  }
2077
1858
  interface StringLiteral extends Span {
2078
1859
  type: "Literal";
2079
1860
  value: string;
2080
1861
  raw: string | null;
2081
- parent: Node;
1862
+ parent: Node$1;
2082
1863
  }
2083
1864
  interface BigIntLiteral extends Span {
2084
1865
  type: "Literal";
2085
1866
  value: bigint;
2086
1867
  raw: string | null;
2087
1868
  bigint: string;
2088
- parent: Node;
1869
+ parent: Node$1;
2089
1870
  }
2090
1871
  interface RegExpLiteral extends Span {
2091
1872
  type: "Literal";
@@ -2095,14 +1876,14 @@ interface RegExpLiteral extends Span {
2095
1876
  pattern: string;
2096
1877
  flags: string;
2097
1878
  };
2098
- parent: Node;
1879
+ parent: Node$1;
2099
1880
  }
2100
1881
  interface JSXElement extends Span {
2101
1882
  type: "JSXElement";
2102
1883
  openingElement: JSXOpeningElement;
2103
1884
  children: Array<JSXChild>;
2104
1885
  closingElement: JSXClosingElement | null;
2105
- parent: Node;
1886
+ parent: Node$1;
2106
1887
  }
2107
1888
  interface JSXOpeningElement extends Span {
2108
1889
  type: "JSXOpeningElement";
@@ -2110,84 +1891,84 @@ interface JSXOpeningElement extends Span {
2110
1891
  typeArguments?: TSTypeParameterInstantiation | null;
2111
1892
  attributes: Array<JSXAttributeItem>;
2112
1893
  selfClosing: boolean;
2113
- parent: Node;
1894
+ parent: Node$1;
2114
1895
  }
2115
1896
  interface JSXClosingElement extends Span {
2116
1897
  type: "JSXClosingElement";
2117
1898
  name: JSXElementName;
2118
- parent: Node;
1899
+ parent: Node$1;
2119
1900
  }
2120
1901
  interface JSXFragment extends Span {
2121
1902
  type: "JSXFragment";
2122
1903
  openingFragment: JSXOpeningFragment;
2123
1904
  children: Array<JSXChild>;
2124
1905
  closingFragment: JSXClosingFragment;
2125
- parent: Node;
1906
+ parent: Node$1;
2126
1907
  }
2127
1908
  interface JSXOpeningFragment extends Span {
2128
1909
  type: "JSXOpeningFragment";
2129
1910
  attributes?: [];
2130
1911
  selfClosing?: false;
2131
- parent: Node;
1912
+ parent: Node$1;
2132
1913
  }
2133
1914
  interface JSXClosingFragment extends Span {
2134
1915
  type: "JSXClosingFragment";
2135
- parent: Node;
1916
+ parent: Node$1;
2136
1917
  }
2137
1918
  type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression;
2138
1919
  interface JSXNamespacedName extends Span {
2139
1920
  type: "JSXNamespacedName";
2140
1921
  namespace: JSXIdentifier;
2141
1922
  name: JSXIdentifier;
2142
- parent: Node;
1923
+ parent: Node$1;
2143
1924
  }
2144
1925
  interface JSXMemberExpression extends Span {
2145
1926
  type: "JSXMemberExpression";
2146
1927
  object: JSXMemberExpressionObject;
2147
1928
  property: JSXIdentifier;
2148
- parent: Node;
1929
+ parent: Node$1;
2149
1930
  }
2150
1931
  type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
2151
1932
  interface JSXExpressionContainer extends Span {
2152
1933
  type: "JSXExpressionContainer";
2153
1934
  expression: JSXExpression;
2154
- parent: Node;
1935
+ parent: Node$1;
2155
1936
  }
2156
1937
  type JSXExpression = JSXEmptyExpression | Expression;
2157
1938
  interface JSXEmptyExpression extends Span {
2158
1939
  type: "JSXEmptyExpression";
2159
- parent: Node;
1940
+ parent: Node$1;
2160
1941
  }
2161
1942
  type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
2162
1943
  interface JSXAttribute extends Span {
2163
1944
  type: "JSXAttribute";
2164
1945
  name: JSXAttributeName;
2165
1946
  value: JSXAttributeValue | null;
2166
- parent: Node;
1947
+ parent: Node$1;
2167
1948
  }
2168
1949
  interface JSXSpreadAttribute extends Span {
2169
1950
  type: "JSXSpreadAttribute";
2170
1951
  argument: Expression;
2171
- parent: Node;
1952
+ parent: Node$1;
2172
1953
  }
2173
1954
  type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
2174
1955
  type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
2175
1956
  interface JSXIdentifier extends Span {
2176
1957
  type: "JSXIdentifier";
2177
1958
  name: string;
2178
- parent: Node;
1959
+ parent: Node$1;
2179
1960
  }
2180
1961
  type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
2181
1962
  interface JSXSpreadChild extends Span {
2182
1963
  type: "JSXSpreadChild";
2183
1964
  expression: Expression;
2184
- parent: Node;
1965
+ parent: Node$1;
2185
1966
  }
2186
1967
  interface JSXText extends Span {
2187
1968
  type: "JSXText";
2188
1969
  value: string;
2189
1970
  raw: string | null;
2190
- parent: Node;
1971
+ parent: Node$1;
2191
1972
  }
2192
1973
  interface TSThisParameter extends Span {
2193
1974
  type: "Identifier";
@@ -2195,7 +1976,7 @@ interface TSThisParameter extends Span {
2195
1976
  name: "this";
2196
1977
  optional: false;
2197
1978
  typeAnnotation: TSTypeAnnotation | null;
2198
- parent: Node;
1979
+ parent: Node$1;
2199
1980
  }
2200
1981
  interface TSEnumDeclaration extends Span {
2201
1982
  type: "TSEnumDeclaration";
@@ -2203,30 +1984,30 @@ interface TSEnumDeclaration extends Span {
2203
1984
  body: TSEnumBody;
2204
1985
  const: boolean;
2205
1986
  declare: boolean;
2206
- parent: Node;
1987
+ parent: Node$1;
2207
1988
  }
2208
1989
  interface TSEnumBody extends Span {
2209
1990
  type: "TSEnumBody";
2210
1991
  members: Array<TSEnumMember>;
2211
- parent: Node;
1992
+ parent: Node$1;
2212
1993
  }
2213
1994
  interface TSEnumMember extends Span {
2214
1995
  type: "TSEnumMember";
2215
1996
  id: TSEnumMemberName;
2216
1997
  initializer: Expression | null;
2217
1998
  computed: boolean;
2218
- parent: Node;
1999
+ parent: Node$1;
2219
2000
  }
2220
2001
  type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral;
2221
2002
  interface TSTypeAnnotation extends Span {
2222
2003
  type: "TSTypeAnnotation";
2223
2004
  typeAnnotation: TSType;
2224
- parent: Node;
2005
+ parent: Node$1;
2225
2006
  }
2226
2007
  interface TSLiteralType extends Span {
2227
2008
  type: "TSLiteralType";
2228
2009
  literal: TSLiteral;
2229
- parent: Node;
2010
+ parent: Node$1;
2230
2011
  }
2231
2012
  type TSLiteral = BooleanLiteral | NumericLiteral | BigIntLiteral | StringLiteral | TemplateLiteral | UnaryExpression;
2232
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;
@@ -2236,137 +2017,137 @@ interface TSConditionalType extends Span {
2236
2017
  extendsType: TSType;
2237
2018
  trueType: TSType;
2238
2019
  falseType: TSType;
2239
- parent: Node;
2020
+ parent: Node$1;
2240
2021
  }
2241
2022
  interface TSUnionType extends Span {
2242
2023
  type: "TSUnionType";
2243
2024
  types: Array<TSType>;
2244
- parent: Node;
2025
+ parent: Node$1;
2245
2026
  }
2246
2027
  interface TSIntersectionType extends Span {
2247
2028
  type: "TSIntersectionType";
2248
2029
  types: Array<TSType>;
2249
- parent: Node;
2030
+ parent: Node$1;
2250
2031
  }
2251
2032
  interface TSParenthesizedType extends Span {
2252
2033
  type: "TSParenthesizedType";
2253
2034
  typeAnnotation: TSType;
2254
- parent: Node;
2035
+ parent: Node$1;
2255
2036
  }
2256
2037
  interface TSTypeOperator extends Span {
2257
2038
  type: "TSTypeOperator";
2258
2039
  operator: TSTypeOperatorOperator;
2259
2040
  typeAnnotation: TSType;
2260
- parent: Node;
2041
+ parent: Node$1;
2261
2042
  }
2262
2043
  type TSTypeOperatorOperator = "keyof" | "unique" | "readonly";
2263
2044
  interface TSArrayType extends Span {
2264
2045
  type: "TSArrayType";
2265
2046
  elementType: TSType;
2266
- parent: Node;
2047
+ parent: Node$1;
2267
2048
  }
2268
2049
  interface TSIndexedAccessType extends Span {
2269
2050
  type: "TSIndexedAccessType";
2270
2051
  objectType: TSType;
2271
2052
  indexType: TSType;
2272
- parent: Node;
2053
+ parent: Node$1;
2273
2054
  }
2274
2055
  interface TSTupleType extends Span {
2275
2056
  type: "TSTupleType";
2276
2057
  elementTypes: Array<TSTupleElement>;
2277
- parent: Node;
2058
+ parent: Node$1;
2278
2059
  }
2279
2060
  interface TSNamedTupleMember extends Span {
2280
2061
  type: "TSNamedTupleMember";
2281
2062
  label: IdentifierName;
2282
2063
  elementType: TSTupleElement;
2283
2064
  optional: boolean;
2284
- parent: Node;
2065
+ parent: Node$1;
2285
2066
  }
2286
2067
  interface TSOptionalType extends Span {
2287
2068
  type: "TSOptionalType";
2288
2069
  typeAnnotation: TSType;
2289
- parent: Node;
2070
+ parent: Node$1;
2290
2071
  }
2291
2072
  interface TSRestType extends Span {
2292
2073
  type: "TSRestType";
2293
2074
  typeAnnotation: TSType;
2294
- parent: Node;
2075
+ parent: Node$1;
2295
2076
  }
2296
2077
  type TSTupleElement = TSOptionalType | TSRestType | TSType;
2297
2078
  interface TSAnyKeyword extends Span {
2298
2079
  type: "TSAnyKeyword";
2299
- parent: Node;
2080
+ parent: Node$1;
2300
2081
  }
2301
2082
  interface TSStringKeyword extends Span {
2302
2083
  type: "TSStringKeyword";
2303
- parent: Node;
2084
+ parent: Node$1;
2304
2085
  }
2305
2086
  interface TSBooleanKeyword extends Span {
2306
2087
  type: "TSBooleanKeyword";
2307
- parent: Node;
2088
+ parent: Node$1;
2308
2089
  }
2309
2090
  interface TSNumberKeyword extends Span {
2310
2091
  type: "TSNumberKeyword";
2311
- parent: Node;
2092
+ parent: Node$1;
2312
2093
  }
2313
2094
  interface TSNeverKeyword extends Span {
2314
2095
  type: "TSNeverKeyword";
2315
- parent: Node;
2096
+ parent: Node$1;
2316
2097
  }
2317
2098
  interface TSIntrinsicKeyword extends Span {
2318
2099
  type: "TSIntrinsicKeyword";
2319
- parent: Node;
2100
+ parent: Node$1;
2320
2101
  }
2321
2102
  interface TSUnknownKeyword extends Span {
2322
2103
  type: "TSUnknownKeyword";
2323
- parent: Node;
2104
+ parent: Node$1;
2324
2105
  }
2325
2106
  interface TSNullKeyword extends Span {
2326
2107
  type: "TSNullKeyword";
2327
- parent: Node;
2108
+ parent: Node$1;
2328
2109
  }
2329
2110
  interface TSUndefinedKeyword extends Span {
2330
2111
  type: "TSUndefinedKeyword";
2331
- parent: Node;
2112
+ parent: Node$1;
2332
2113
  }
2333
2114
  interface TSVoidKeyword extends Span {
2334
2115
  type: "TSVoidKeyword";
2335
- parent: Node;
2116
+ parent: Node$1;
2336
2117
  }
2337
2118
  interface TSSymbolKeyword extends Span {
2338
2119
  type: "TSSymbolKeyword";
2339
- parent: Node;
2120
+ parent: Node$1;
2340
2121
  }
2341
2122
  interface TSThisType extends Span {
2342
2123
  type: "TSThisType";
2343
- parent: Node;
2124
+ parent: Node$1;
2344
2125
  }
2345
2126
  interface TSObjectKeyword extends Span {
2346
2127
  type: "TSObjectKeyword";
2347
- parent: Node;
2128
+ parent: Node$1;
2348
2129
  }
2349
2130
  interface TSBigIntKeyword extends Span {
2350
2131
  type: "TSBigIntKeyword";
2351
- parent: Node;
2132
+ parent: Node$1;
2352
2133
  }
2353
2134
  interface TSTypeReference extends Span {
2354
2135
  type: "TSTypeReference";
2355
2136
  typeName: TSTypeName;
2356
2137
  typeArguments: TSTypeParameterInstantiation | null;
2357
- parent: Node;
2138
+ parent: Node$1;
2358
2139
  }
2359
2140
  type TSTypeName = IdentifierReference | TSQualifiedName | ThisExpression;
2360
2141
  interface TSQualifiedName extends Span {
2361
2142
  type: "TSQualifiedName";
2362
2143
  left: TSTypeName;
2363
2144
  right: IdentifierName;
2364
- parent: Node;
2145
+ parent: Node$1;
2365
2146
  }
2366
2147
  interface TSTypeParameterInstantiation extends Span {
2367
2148
  type: "TSTypeParameterInstantiation";
2368
2149
  params: Array<TSType>;
2369
- parent: Node;
2150
+ parent: Node$1;
2370
2151
  }
2371
2152
  interface TSTypeParameter extends Span {
2372
2153
  type: "TSTypeParameter";
@@ -2376,12 +2157,12 @@ interface TSTypeParameter extends Span {
2376
2157
  in: boolean;
2377
2158
  out: boolean;
2378
2159
  const: boolean;
2379
- parent: Node;
2160
+ parent: Node$1;
2380
2161
  }
2381
2162
  interface TSTypeParameterDeclaration extends Span {
2382
2163
  type: "TSTypeParameterDeclaration";
2383
2164
  params: Array<TSTypeParameter>;
2384
- parent: Node;
2165
+ parent: Node$1;
2385
2166
  }
2386
2167
  interface TSTypeAliasDeclaration extends Span {
2387
2168
  type: "TSTypeAliasDeclaration";
@@ -2389,14 +2170,14 @@ interface TSTypeAliasDeclaration extends Span {
2389
2170
  typeParameters: TSTypeParameterDeclaration | null;
2390
2171
  typeAnnotation: TSType;
2391
2172
  declare: boolean;
2392
- parent: Node;
2173
+ parent: Node$1;
2393
2174
  }
2394
2175
  type TSAccessibility = "private" | "protected" | "public";
2395
2176
  interface TSClassImplements extends Span {
2396
2177
  type: "TSClassImplements";
2397
2178
  expression: IdentifierReference | ThisExpression | MemberExpression;
2398
2179
  typeArguments: TSTypeParameterInstantiation | null;
2399
- parent: Node;
2180
+ parent: Node$1;
2400
2181
  }
2401
2182
  interface TSInterfaceDeclaration extends Span {
2402
2183
  type: "TSInterfaceDeclaration";
@@ -2405,12 +2186,12 @@ interface TSInterfaceDeclaration extends Span {
2405
2186
  extends: Array<TSInterfaceHeritage>;
2406
2187
  body: TSInterfaceBody;
2407
2188
  declare: boolean;
2408
- parent: Node;
2189
+ parent: Node$1;
2409
2190
  }
2410
2191
  interface TSInterfaceBody extends Span {
2411
2192
  type: "TSInterfaceBody";
2412
2193
  body: Array<TSSignature>;
2413
- parent: Node;
2194
+ parent: Node$1;
2414
2195
  }
2415
2196
  interface TSPropertySignature extends Span {
2416
2197
  type: "TSPropertySignature";
@@ -2421,7 +2202,7 @@ interface TSPropertySignature extends Span {
2421
2202
  typeAnnotation: TSTypeAnnotation | null;
2422
2203
  accessibility: null;
2423
2204
  static: false;
2424
- parent: Node;
2205
+ parent: Node$1;
2425
2206
  }
2426
2207
  type TSSignature = TSIndexSignature | TSPropertySignature | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSMethodSignature;
2427
2208
  interface TSIndexSignature extends Span {
@@ -2431,14 +2212,14 @@ interface TSIndexSignature extends Span {
2431
2212
  readonly: boolean;
2432
2213
  static: boolean;
2433
2214
  accessibility: null;
2434
- parent: Node;
2215
+ parent: Node$1;
2435
2216
  }
2436
2217
  interface TSCallSignatureDeclaration extends Span {
2437
2218
  type: "TSCallSignatureDeclaration";
2438
2219
  typeParameters: TSTypeParameterDeclaration | null;
2439
2220
  params: ParamPattern[];
2440
2221
  returnType: TSTypeAnnotation | null;
2441
- parent: Node;
2222
+ parent: Node$1;
2442
2223
  }
2443
2224
  type TSMethodSignatureKind = "method" | "get" | "set";
2444
2225
  interface TSMethodSignature extends Span {
@@ -2453,14 +2234,14 @@ interface TSMethodSignature extends Span {
2453
2234
  accessibility: null;
2454
2235
  readonly: false;
2455
2236
  static: false;
2456
- parent: Node;
2237
+ parent: Node$1;
2457
2238
  }
2458
2239
  interface TSConstructSignatureDeclaration extends Span {
2459
2240
  type: "TSConstructSignatureDeclaration";
2460
2241
  typeParameters: TSTypeParameterDeclaration | null;
2461
2242
  params: ParamPattern[];
2462
2243
  returnType: TSTypeAnnotation | null;
2463
- parent: Node;
2244
+ parent: Node$1;
2464
2245
  }
2465
2246
  interface TSIndexSignatureName extends Span {
2466
2247
  type: "Identifier";
@@ -2468,20 +2249,20 @@ interface TSIndexSignatureName extends Span {
2468
2249
  name: string;
2469
2250
  optional: false;
2470
2251
  typeAnnotation: TSTypeAnnotation;
2471
- parent: Node;
2252
+ parent: Node$1;
2472
2253
  }
2473
2254
  interface TSInterfaceHeritage extends Span {
2474
2255
  type: "TSInterfaceHeritage";
2475
2256
  expression: Expression;
2476
2257
  typeArguments: TSTypeParameterInstantiation | null;
2477
- parent: Node;
2258
+ parent: Node$1;
2478
2259
  }
2479
2260
  interface TSTypePredicate extends Span {
2480
2261
  type: "TSTypePredicate";
2481
2262
  parameterName: TSTypePredicateName;
2482
2263
  asserts: boolean;
2483
2264
  typeAnnotation: TSTypeAnnotation | null;
2484
- parent: Node;
2265
+ parent: Node$1;
2485
2266
  }
2486
2267
  type TSTypePredicateName = IdentifierName | TSThisType;
2487
2268
  type TSModuleDeclarationKind = "module" | "namespace";
@@ -2492,7 +2273,7 @@ interface TSModuleDeclaration extends Span {
2492
2273
  kind: TSModuleDeclarationKind;
2493
2274
  declare: boolean;
2494
2275
  global: false;
2495
- parent: Node;
2276
+ parent: Node$1;
2496
2277
  }
2497
2278
  interface TSGlobalDeclaration extends Span {
2498
2279
  type: "TSModuleDeclaration";
@@ -2501,28 +2282,28 @@ interface TSGlobalDeclaration extends Span {
2501
2282
  kind: "global";
2502
2283
  declare: boolean;
2503
2284
  global: true;
2504
- parent: Node;
2285
+ parent: Node$1;
2505
2286
  }
2506
2287
  interface TSModuleBlock extends Span {
2507
2288
  type: "TSModuleBlock";
2508
2289
  body: Array<Directive$1 | Statement>;
2509
- parent: Node;
2290
+ parent: Node$1;
2510
2291
  }
2511
2292
  interface TSTypeLiteral extends Span {
2512
2293
  type: "TSTypeLiteral";
2513
2294
  members: Array<TSSignature>;
2514
- parent: Node;
2295
+ parent: Node$1;
2515
2296
  }
2516
2297
  interface TSInferType extends Span {
2517
2298
  type: "TSInferType";
2518
2299
  typeParameter: TSTypeParameter;
2519
- parent: Node;
2300
+ parent: Node$1;
2520
2301
  }
2521
2302
  interface TSTypeQuery extends Span {
2522
2303
  type: "TSTypeQuery";
2523
2304
  exprName: TSTypeQueryExprName;
2524
2305
  typeArguments: TSTypeParameterInstantiation | null;
2525
- parent: Node;
2306
+ parent: Node$1;
2526
2307
  }
2527
2308
  type TSTypeQueryExprName = TSImportType | TSTypeName;
2528
2309
  interface TSImportType extends Span {
@@ -2531,128 +2312,750 @@ interface TSImportType extends Span {
2531
2312
  options: ObjectExpression | null;
2532
2313
  qualifier: TSImportTypeQualifier | null;
2533
2314
  typeArguments: TSTypeParameterInstantiation | null;
2534
- parent: Node;
2315
+ parent: Node$1;
2316
+ }
2317
+ type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName;
2318
+ interface TSImportTypeQualifiedName extends Span {
2319
+ type: "TSQualifiedName";
2320
+ left: TSImportTypeQualifier;
2321
+ right: IdentifierName;
2322
+ parent: Node$1;
2323
+ }
2324
+ interface TSFunctionType extends Span {
2325
+ type: "TSFunctionType";
2326
+ typeParameters: TSTypeParameterDeclaration | null;
2327
+ params: ParamPattern[];
2328
+ returnType: TSTypeAnnotation;
2329
+ parent: Node$1;
2330
+ }
2331
+ interface TSConstructorType extends Span {
2332
+ type: "TSConstructorType";
2333
+ abstract: boolean;
2334
+ typeParameters: TSTypeParameterDeclaration | null;
2335
+ params: ParamPattern[];
2336
+ returnType: TSTypeAnnotation;
2337
+ parent: Node$1;
2338
+ }
2339
+ interface TSMappedType extends Span {
2340
+ type: "TSMappedType";
2341
+ key: BindingIdentifier;
2342
+ constraint: TSType;
2343
+ nameType: TSType | null;
2344
+ typeAnnotation: TSType | null;
2345
+ optional: TSMappedTypeModifierOperator | false;
2346
+ readonly: TSMappedTypeModifierOperator | null;
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;
2535
2406
  }
2536
- type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName;
2537
- interface TSImportTypeQualifiedName extends Span {
2538
- type: "TSQualifiedName";
2539
- left: TSImportTypeQualifier;
2540
- right: IdentifierName;
2541
- parent: Node;
2407
+ interface TSInstantiationExpression extends Span {
2408
+ type: "TSInstantiationExpression";
2409
+ expression: Expression;
2410
+ typeArguments: TSTypeParameterInstantiation;
2411
+ parent: Node$1;
2542
2412
  }
2543
- interface TSFunctionType extends Span {
2544
- type: "TSFunctionType";
2545
- typeParameters: TSTypeParameterDeclaration | null;
2546
- params: ParamPattern[];
2547
- returnType: TSTypeAnnotation;
2548
- parent: Node;
2413
+ type ImportOrExportKind = "value" | "type";
2414
+ interface JSDocNullableType extends Span {
2415
+ type: "TSJSDocNullableType";
2416
+ typeAnnotation: TSType;
2417
+ postfix: boolean;
2418
+ parent: Node$1;
2549
2419
  }
2550
- interface TSConstructorType extends Span {
2551
- type: "TSConstructorType";
2552
- abstract: boolean;
2553
- typeParameters: TSTypeParameterDeclaration | null;
2554
- params: ParamPattern[];
2555
- returnType: TSTypeAnnotation;
2556
- parent: Node;
2420
+ interface JSDocNonNullableType extends Span {
2421
+ type: "TSJSDocNonNullableType";
2422
+ typeAnnotation: TSType;
2423
+ postfix: boolean;
2424
+ parent: Node$1;
2557
2425
  }
2558
- interface TSMappedType extends Span {
2559
- type: "TSMappedType";
2560
- key: BindingIdentifier;
2561
- constraint: TSType;
2562
- nameType: TSType | null;
2563
- typeAnnotation: TSType | null;
2564
- optional: TSMappedTypeModifierOperator | false;
2565
- readonly: TSMappedTypeModifierOperator | null;
2566
- parent: Node;
2426
+ interface JSDocUnknownType extends Span {
2427
+ type: "TSJSDocUnknownType";
2428
+ parent: Node$1;
2567
2429
  }
2568
- type TSMappedTypeModifierOperator = true | "+" | "-";
2569
- interface TSTemplateLiteralType extends Span {
2570
- type: "TSTemplateLiteralType";
2571
- quasis: Array<TemplateElement>;
2572
- types: Array<TSType>;
2573
- parent: Node;
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;
2574
2775
  }
2575
- interface TSAsExpression extends Span {
2576
- type: "TSAsExpression";
2577
- expression: Expression;
2578
- typeAnnotation: TSType;
2579
- parent: Node;
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 };
2580
2789
  }
2581
- interface TSSatisfiesExpression extends Span {
2582
- type: "TSSatisfiesExpression";
2583
- expression: Expression;
2584
- typeAnnotation: TSType;
2585
- parent: Node;
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;
2586
2799
  }
2587
- interface TSTypeAssertion extends Span {
2588
- type: "TSTypeAssertion";
2589
- typeAnnotation: TSType;
2590
- expression: Expression;
2591
- parent: Node;
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;
2592
2807
  }
2593
- interface TSImportEqualsDeclaration extends Span {
2594
- type: "TSImportEqualsDeclaration";
2595
- id: BindingIdentifier;
2596
- moduleReference: TSModuleReference;
2597
- importKind: ImportOrExportKind;
2598
- parent: Node;
2808
+ /**
2809
+ * Source code location.
2810
+ */
2811
+ interface Location {
2812
+ start: LineColumn;
2813
+ end: LineColumn;
2599
2814
  }
2600
- type TSModuleReference = TSExternalModuleReference | IdentifierReference | TSQualifiedName;
2601
- interface TSExternalModuleReference extends Span {
2602
- type: "TSExternalModuleReference";
2603
- expression: StringLiteral;
2604
- parent: Node;
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;
2605
2822
  }
2606
- interface TSNonNullExpression extends Span {
2607
- type: "TSNonNullExpression";
2608
- expression: Expression;
2609
- parent: Node;
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;
2610
2913
  }
2611
- interface Decorator extends Span {
2612
- type: "Decorator";
2613
- expression: Expression;
2614
- parent: Node;
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;
2615
2943
  }
2616
- interface TSExportAssignment extends Span {
2617
- type: "TSExportAssignment";
2618
- expression: Expression;
2619
- parent: Node;
2944
+ /**
2945
+ * Location with `end` property optional.
2946
+ */
2947
+ interface LocationWithOptionalEnd {
2948
+ start: LineColumn;
2949
+ end?: LineColumn | null | undefined;
2620
2950
  }
2621
- interface TSNamespaceExportDeclaration extends Span {
2622
- type: "TSNamespaceExportDeclaration";
2623
- id: IdentifierName;
2624
- parent: Node;
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;
2625
2964
  }
2626
- interface TSInstantiationExpression extends Span {
2627
- type: "TSInstantiationExpression";
2628
- expression: Expression;
2629
- typeArguments: TSTypeParameterInstantiation;
2630
- parent: Node;
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 };
2631
2975
  }
2632
- type ImportOrExportKind = "value" | "type";
2633
- interface JSDocNullableType extends Span {
2634
- type: "TSJSDocNullableType";
2635
- typeAnnotation: TSType;
2636
- postfix: boolean;
2637
- parent: Node;
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 };
2638
3042
  }
2639
- interface JSDocNonNullableType extends Span {
2640
- type: "TSJSDocNonNullableType";
2641
- typeAnnotation: TSType;
2642
- postfix: boolean;
2643
- parent: Node;
3043
+ interface Problem {
3044
+ ruleId: string | null;
3045
+ message: string;
3046
+ loc: Location;
2644
3047
  }
2645
- interface JSDocUnknownType extends Span {
2646
- type: "TSJSDocUnknownType";
2647
- parent: Node;
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;
2648
3054
  }
2649
- type ModuleKind = "script" | "module" | "commonjs";
2650
- type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
2651
- type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
2652
- type LogicalOperator = "||" | "&&" | "??";
2653
- type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
2654
- type UpdateOperator = "++" | "--";
2655
- 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;
3055
+ declare function getDisableDirectives(): {
3056
+ problems: Problem[];
3057
+ directives: Directive[];
3058
+ };
2656
3059
  declare namespace scope_d_exports {
2657
3060
  export { Definition, DefinitionType, Reference, SCOPE_MANAGER, Scope, ScopeManager, ScopeType, Variable, getDeclaredVariables, getScope, isGlobalReference, markVariableAsUsed, resetScopeManager };
2658
3061
  }
@@ -2662,7 +3065,7 @@ interface Scope {
2662
3065
  upper: Scope | null;
2663
3066
  childScopes: Scope[];
2664
3067
  variableScope: Scope;
2665
- block: Node;
3068
+ block: Node$1;
2666
3069
  variables: Variable[];
2667
3070
  set: Map<string, Variable>;
2668
3071
  references: Reference[];
@@ -2696,8 +3099,8 @@ interface Reference {
2696
3099
  interface Definition {
2697
3100
  type: DefinitionType;
2698
3101
  name: Identifier;
2699
- node: Node;
2700
- parent: Node | null;
3102
+ node: Node$1;
3103
+ parent: Node$1 | null;
2701
3104
  }
2702
3105
  type DefinitionType = "CatchClause" | "ClassName" | "FunctionName" | "ImplicitGlobalVariable" | "ImportBinding" | "Parameter" | "Variable";
2703
3106
  type Identifier = IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | TSThisParameter | TSIndexSignatureName;
@@ -2720,118 +3123,51 @@ declare const SCOPE_MANAGER: Readonly<{
2720
3123
  * If the node does not define any variable, this returns an empty array.
2721
3124
  * @param node AST node to get variables of.
2722
3125
  */
2723
- getDeclaredVariables(node: Node): Variable[];
3126
+ getDeclaredVariables(node: Node$1): Variable[];
2724
3127
  /**
2725
3128
  * Get the scope of a given AST node. The returned scope's `block` property is the node.
2726
- * This method never returns `function-expression-name` scope.
2727
- * If the node does not have a scope, returns `null`.
2728
- *
2729
- * @param node An AST node to get their scope.
2730
- * @param inner If the node has multiple scopes, this returns the outermost scope normally.
2731
- * If `inner` is `true` then this returns the innermost scope.
2732
- */
2733
- acquire(node: Node, inner?: boolean): Scope | null;
2734
- }>;
2735
- type ScopeManager = typeof SCOPE_MANAGER;
2736
- /**
2737
- * Determine whether the given identifier node is a reference to a global variable.
2738
- * @param node - `Identifier` node to check.
2739
- * @returns `true` if the identifier is a reference to a global variable.
2740
- */
2741
- declare function isGlobalReference(node: Node): boolean;
2742
- /**
2743
- * Get the variables that `node` defines.
2744
- * This is a convenience method that passes through to the same method on the `ScopeManager`.
2745
- * @param node - The node for which the variables are obtained.
2746
- * @returns An array of variable nodes representing the variables that `node` defines.
2747
- */
2748
- declare function getDeclaredVariables(node: Node): Variable[];
2749
- /**
2750
- * Get the scope for the given node.
2751
- * @param node - The node to get the scope of.
2752
- * @returns The scope information for this node.
2753
- */
2754
- declare function getScope(node: Node): Scope;
2755
- /**
2756
- * Marks as used a variable with the given name in a scope indicated by the given reference node.
2757
- *
2758
- * IMPORTANT: At present marking variables as used only affects other JS plugins.
2759
- * It does *not* get communicated to Oxlint's rules which are implemented on Rust side e.g. `no-unused-vars`.
2760
- * This is a known shortcoming, and will be addressed in a future release.
2761
- * https://github.com/oxc-project/oxc/issues/20350
2762
- *
2763
- * @param name - Variable name
2764
- * @param refNode - Reference node. Defaults to `Program` node if not provided.
2765
- * @returns `true` if a variable with the given name was found and marked as used, otherwise `false`
2766
- */
2767
- declare function markVariableAsUsed(name: string, refNode?: Node): boolean;
2768
- declare namespace comments_methods_d_exports {
2769
- export { commentsExistBetween, getAllComments, getCommentsAfter, getCommentsBefore, getCommentsInside, getJSDocComment };
2770
- }
2771
- /**
2772
- * Retrieve an array containing all comments in the source code.
2773
- * @returns Array of `Comment`s in order they appear in source.
2774
- */
2775
- declare function getAllComments(): CommentType[];
2776
- /**
2777
- * Get all comments directly before the given node or token.
2778
- *
2779
- * "Directly before" means only comments before this node, and after the preceding token.
2780
- *
2781
- * ```js
2782
- * // Define `x`
2783
- * const x = 1;
2784
- * // Define `y`
2785
- * const y = 2;
2786
- * ```
2787
- *
2788
- * `sourceCode.getCommentsBefore(varDeclY)` will only return "Define `y`" comment, not also "Define `x`".
2789
- *
2790
- * @param nodeOrToken - The AST node or token to check for adjacent comment tokens.
2791
- * @returns Array of `Comment`s in occurrence order.
2792
- */
2793
- declare function getCommentsBefore(nodeOrToken: NodeOrToken): CommentType[];
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;
2794
3139
  /**
2795
- * Get all comment tokens directly after the given node or token.
2796
- *
2797
- * "Directly after" means only comments between end of this node, and the next token following it.
2798
- *
2799
- * ```js
2800
- * const x = 1;
2801
- * // Define `y`
2802
- * const y = 2;
2803
- * // Define `z`
2804
- * const z = 3;
2805
- * ```
2806
- *
2807
- * `sourceCode.getCommentsAfter(varDeclX)` will only return "Define `y`" comment, not also "Define `z`".
2808
- *
2809
- * @param nodeOrToken - The AST node or token to check for adjacent comment tokens.
2810
- * @returns Array of `Comment`s in occurrence order.
3140
+ * Determine whether the given identifier node is a reference to a global variable.
3141
+ * @param node - `Identifier` node to check.
3142
+ * @returns `true` if the identifier is a reference to a global variable.
2811
3143
  */
2812
- declare function getCommentsAfter(nodeOrToken: NodeOrToken): CommentType[];
3144
+ declare function isGlobalReference(node: Node$1): boolean;
2813
3145
  /**
2814
- * Get all comment tokens inside the given node.
2815
- * @param node - The AST node to get the comments for.
2816
- * @returns Array of `Comment`s in occurrence order.
3146
+ * Get the variables that `node` defines.
3147
+ * This is a convenience method that passes through to the same method on the `ScopeManager`.
3148
+ * @param node - The node for which the variables are obtained.
3149
+ * @returns An array of variable nodes representing the variables that `node` defines.
2817
3150
  */
2818
- declare function getCommentsInside(node: Node$1): CommentType[];
3151
+ declare function getDeclaredVariables(node: Node$1): Variable[];
2819
3152
  /**
2820
- * Check whether any comments exist or not between the given 2 nodes.
2821
- * @param nodeOrToken1 - Start node/token.
2822
- * @param nodeOrToken2 - End node/token.
2823
- * @returns `true` if one or more comments exist between the two.
3153
+ * Get the scope for the given node.
3154
+ * @param node - The node to get the scope of.
3155
+ * @returns The scope information for this node.
2824
3156
  */
2825
- declare function commentsExistBetween(nodeOrToken1: NodeOrToken, nodeOrToken2: NodeOrToken): boolean;
3157
+ declare function getScope(node: Node$1): Scope;
2826
3158
  /**
2827
- * Retrieve the JSDoc comment for a given node.
3159
+ * Marks as used a variable with the given name in a scope indicated by the given reference node.
2828
3160
  *
2829
- * @deprecated
3161
+ * IMPORTANT: At present marking variables as used only affects other JS plugins.
3162
+ * It does *not* get communicated to Oxlint's rules which are implemented on Rust side e.g. `no-unused-vars`.
3163
+ * This is a known shortcoming, and will be addressed in a future release.
3164
+ * https://github.com/oxc-project/oxc/issues/20350
2830
3165
  *
2831
- * @param node - The AST node to get the comment for.
2832
- * @returns The JSDoc comment for the given node, or `null` if not found.
3166
+ * @param name - Variable name
3167
+ * @param refNode - Reference node. Defaults to `Program` node if not provided.
3168
+ * @returns `true` if a variable with the given name was found and marked as used, otherwise `false`
2833
3169
  */
2834
- declare function getJSDocComment(node: Node$1): CommentType | null;
3170
+ declare function markVariableAsUsed(name: string, refNode?: Node$1): boolean;
2835
3171
  //#endregion
2836
3172
  //#region src-js/plugins/tokens_and_comments.d.ts
2837
3173
  type TokenOrComment = TokenType | CommentType;
@@ -2896,7 +3232,7 @@ type TokenResult<Options> = MayIncludeComments<Options> extends true ? TokenOrCo
2896
3232
  * @param afterCount? - The number of tokens after the node to retrieve.
2897
3233
  * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
2898
3234
  */
2899
- declare function getTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node$1, countOptions?: Options, afterCount?: number | null): TokenResult<Options>[];
3235
+ declare function getTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node, countOptions?: Options, afterCount?: number | null): TokenResult<Options>[];
2900
3236
  /**
2901
3237
  * Get the first token of the given node.
2902
3238
  * @param node - The AST node.
@@ -2905,7 +3241,7 @@ declare function getTokens<Options extends CountOptions | number | FilterFn | nu
2905
3241
  * If is a function, equivalent to `{ filter: fn }`.
2906
3242
  * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
2907
3243
  */
2908
- declare function getFirstToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node$1, skipOptions?: Options): TokenResult<Options> | null;
3244
+ declare function getFirstToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node, skipOptions?: Options): TokenResult<Options> | null;
2909
3245
  /**
2910
3246
  * Get the first tokens of the given node.
2911
3247
  * @param node - The AST node.
@@ -2914,7 +3250,7 @@ declare function getFirstToken<Options extends SkipOptions | number | FilterFn |
2914
3250
  * If is a function, equivalent to `{ filter: fn }`.
2915
3251
  * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
2916
3252
  */
2917
- declare function getFirstTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node$1, countOptions?: Options): TokenResult<Options>[];
3253
+ declare function getFirstTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node, countOptions?: Options): TokenResult<Options>[];
2918
3254
  /**
2919
3255
  * Get the last token of the given node.
2920
3256
  * @param node - The AST node.
@@ -2923,516 +3259,188 @@ declare function getFirstTokens<Options extends CountOptions | number | FilterFn
2923
3259
  * If is a function, equivalent to `{ filter: fn }`.
2924
3260
  * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
2925
3261
  */
2926
- declare function getLastToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node$1, skipOptions?: Options): TokenResult<Options> | null;
3262
+ declare function getLastToken<Options extends SkipOptions | number | FilterFn | null | undefined>(node: Node, skipOptions?: Options): TokenResult<Options> | null;
2927
3263
  /**
2928
3264
  * Get the last tokens of the given node.
2929
3265
  * @param node - The AST node.
2930
- * @param countOptions? - Options object.
2931
- * If is a number, equivalent to `{ count: n }`.
2932
- * If is a function, equivalent to `{ filter: fn }`.
2933
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
2934
- */
2935
- declare function getLastTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node$1, countOptions?: Options): TokenResult<Options>[];
2936
- /**
2937
- * Get the token that precedes a given node or token.
2938
- * @param nodeOrToken - The AST node or token.
2939
- * @param skipOptions? - Options object.
2940
- * If is a number, equivalent to `{ skip: n }`.
2941
- * If is a function, equivalent to `{ filter: fn }`.
2942
- * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
2943
- */
2944
- declare function getTokenBefore<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
2945
- /**
2946
- * Get the token that precedes a given node or token.
2947
- *
2948
- * @deprecated Use `sourceCode.getTokenBefore` with `includeComments: true` instead.
2949
- *
2950
- * @param nodeOrToken The AST node or token.
2951
- * @param skip - Number of tokens to skip.
2952
- * @returns `TokenOrComment | null`.
2953
- */
2954
- declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
2955
- /**
2956
- * Get the tokens that precede a given node or token.
2957
- * @param nodeOrToken - The AST node or token.
2958
- * @param countOptions? - Options object.
2959
- * If is a number, equivalent to `{ count: n }`.
2960
- * If is a function, equivalent to `{ filter: fn }`.
2961
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
2962
- */
2963
- declare function getTokensBefore<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
2964
- /**
2965
- * Get the token that follows a given node or token.
2966
- * @param nodeOrToken - The AST node or token.
2967
- * @param skipOptions? - Options object.
2968
- * If is a number, equivalent to `{ skip: n }`.
2969
- * If is a function, equivalent to `{ filter: fn }`.
2970
- * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
2971
- */
2972
- declare function getTokenAfter<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
2973
- /**
2974
- * Get the token that follows a given node or token.
2975
- *
2976
- * @deprecated Use `sourceCode.getTokenAfter` with `includeComments: true` instead.
2977
- *
2978
- * @param nodeOrToken The AST node or token.
2979
- * @param skip - Number of tokens to skip.
2980
- * @returns `TokenOrComment | null`.
2981
- */
2982
- declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
2983
- /**
2984
- * Get the tokens that follow a given node or token.
2985
- * @param nodeOrToken - The AST node or token.
2986
- * @param countOptions? - Options object.
2987
- * If is a number, equivalent to `{ count: n }`.
2988
- * If is a function, equivalent to `{ filter: fn }`.
2989
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
2990
- */
2991
- declare function getTokensAfter<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
2992
- /**
2993
- * Get all of the tokens between two non-overlapping nodes.
2994
- * @param left - Node or token before the desired token range.
2995
- * @param right - Node or token after the desired token range.
2996
- * @param countOptions? - Options object. If is a function, equivalent to `{ filter: fn }`.
2997
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
2998
- */
2999
- /**
3000
- * Get all of the tokens between two non-overlapping nodes.
3001
- * @param left - Node or token before the desired token range.
3002
- * @param right - Node or token after the desired token range.
3003
- * @param padding - Number of extra tokens on either side of center.
3004
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
3005
- */
3006
- declare function getTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3007
- /**
3008
- * Get the first token between two non-overlapping nodes.
3009
- * @param left - Node or token before the desired token range.
3010
- * @param right - Node or token after the desired token range.
3011
- * @param skipOptions? - Options object.
3012
- * If is a number, equivalent to `{ skip: n }`.
3013
- * If is a function, equivalent to `{ filter: fn }`.
3014
- * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
3015
- */
3016
- declare function getFirstTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
3017
- /**
3018
- * Get the first tokens between two non-overlapping nodes.
3019
- * @param left - Node or token before the desired token range.
3020
- * @param right - Node or token after the desired token range.
3021
- * @param countOptions? - Options object.
3022
- * If is a number, equivalent to `{ count: n }`.
3023
- * If is a function, equivalent to `{ filter: fn }`.
3024
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
3025
- */
3026
- declare function getFirstTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3027
- /**
3028
- * Get the last token between two non-overlapping nodes.
3029
- * @param left - Node or token before the desired token range.
3030
- * @param right - Node or token after the desired token range.
3031
- * @param skipOptions? - Options object.
3032
- * If is a number, equivalent to `{ skip: n }`.
3033
- * If is a function, equivalent to `{ filter: fn }`.
3034
- * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
3035
- */
3036
- declare function getLastTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
3037
- /**
3038
- * Get the last tokens between two non-overlapping nodes.
3039
- * @param left - Node or token before the desired token range.
3040
- * @param right - Node or token after the desired token range.
3041
- * @param countOptions? - Options object.
3042
- * If is a number, equivalent to `{ count: n }`.
3043
- * If is a function, equivalent to `{ filter: fn }`.
3044
- * @returns Array of `Token`s, or array of `Token | Comment`s if `includeComments` is `true`.
3045
- */
3046
- declare function getLastTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3047
- /**
3048
- * Get the token starting at the specified index.
3049
- * @param offset - Start offset of the token.
3050
- * @param rangeOptions - Options object.
3051
- * @returns `Token` (or `Token | Comment` if `includeComments` is `true`), or `null` if none found.
3052
- */
3053
- declare function getTokenByRangeStart<Options extends RangeOptions | null | undefined>(offset: number, rangeOptions?: Options): TokenResult<Options> | null;
3054
- /**
3055
- * Determine if two nodes or tokens have at least one whitespace character between them.
3056
- * Order does not matter.
3057
- *
3058
- * Returns `false` if the given nodes or tokens overlap.
3059
- *
3060
- * Checks for whitespace *between tokens*, not including whitespace *inside tokens*.
3061
- * e.g. Returns `false` for `isSpaceBetween(x, y)` in `x+" "+y`.
3062
- *
3063
- * @param first - The first node or token to check between.
3064
- * @param second - The second node or token to check between.
3065
- * @returns `true` if there is a whitespace character between
3066
- * any of the tokens found between the two given nodes or tokens.
3067
- */
3068
- declare function isSpaceBetween(first: NodeOrToken, second: NodeOrToken): boolean;
3069
- /**
3070
- * Determine if two nodes or tokens have at least one whitespace character between them.
3071
- * Order does not matter.
3072
- *
3073
- * Returns `false` if the given nodes or tokens overlap.
3074
- *
3075
- * Checks for whitespace *between tokens*, not including whitespace *inside tokens*.
3076
- * e.g. Returns `false` for `isSpaceBetween(x, y)` in `x+" "+y`.
3077
- *
3078
- * Unlike `SourceCode#isSpaceBetween`, this function does return `true` if there is a `JSText` token between the two
3079
- * input tokens, and it contains whitespace.
3080
- * e.g. Returns `true` for `isSpaceBetweenTokens(x, slash)` in `<X>a b</X>`.
3081
- *
3082
- * @deprecated Use `sourceCode.isSpaceBetween` instead.
3083
- *
3084
- * @param first - The first node or token to check between.
3085
- * @param second - The second node or token to check between.
3086
- * @returns `true` if there is a whitespace character between
3087
- * any of the tokens found between the two given nodes or tokens.
3088
- */
3089
- declare function isSpaceBetweenTokens(first: NodeOrToken, second: NodeOrToken): boolean;
3090
- /**
3091
- * Find the index of the first entry in a `Int32Array` buffer whose `start` is >= `offset`, via binary search.
3092
- *
3093
- * Each entry occupies 4 x u32s (16 bytes), with `start` as the first u32.
3094
- * Searched range starts at `startIndex` and ends at `length`.
3095
- *
3096
- * Returns `length` if all entries have `start` < `offset`.
3097
- *
3098
- * Note: Source text is limited to 1 GiB max, so number of tokens cannot exceed 2^30.
3099
- * This makes it safe to use `>> 1` for division by 2 below (which is faster than `>>> 1`).
3100
- *
3101
- * @param int32 - `Int32Array` buffer (tokens, comments, or tokensAndComments)
3102
- * @param offset - Source offset to search for
3103
- * @param startIndex - Starting entry index for the search
3104
- * @param length - Total number of entries in the buffer
3105
- * @returns Index of first entry with `start >= offset`
3106
- */
3107
- declare function firstTokenAtOrAfter(int32: Int32Array, offset: number, startIndex: number, length: number): number;
3108
- declare namespace directives_d_exports {
3109
- export { getDisableDirectives };
3110
- }
3111
- interface Problem {
3112
- ruleId: string | null;
3113
- message: string;
3114
- loc: Location;
3115
- }
3116
- type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
3117
- interface Directive {
3118
- type: DirectiveType;
3119
- node: CommentType;
3120
- value: string;
3121
- justification: string;
3122
- }
3123
- declare function getDisableDirectives(): {
3124
- problems: Problem[];
3125
- directives: Directive[];
3126
- };
3127
- //#endregion
3128
- //#region src-js/plugins/json.d.ts
3129
- /**
3130
- * A JSON value.
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`.
3131
3270
  */
3132
- type JsonValue = JsonObject | JsonValue[] | string | number | boolean | null;
3271
+ declare function getLastTokens<Options extends CountOptions | number | FilterFn | null | undefined>(node: Node, countOptions?: Options): TokenResult<Options>[];
3133
3272
  /**
3134
- * A JSON object.
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.
3135
3279
  */
3136
- type JsonObject = {
3137
- [key: string]: JsonValue;
3138
- };
3139
- //#endregion
3140
- //#region src-js/plugins/globals.d.ts
3280
+ declare function getTokenBefore<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
3141
3281
  /**
3142
- * Globals for the file being linted.
3282
+ * Get the token that precedes a given node or token.
3143
3283
  *
3144
- * Globals are deserialized from JSON, so can only contain JSON-compatible values.
3145
- * Each global variable maps to "readonly", "writable", or "off".
3146
- */
3147
- type Globals$1 = Record<string, "readonly" | "writable" | "off">;
3148
- /**
3149
- * Environments for the file being linted.
3284
+ * @deprecated Use `sourceCode.getTokenBefore` with `includeComments: true` instead.
3150
3285
  *
3151
- * Only includes environments that are enabled, so all properties are `true`.
3286
+ * @param nodeOrToken The AST node or token.
3287
+ * @param skip - Number of tokens to skip.
3288
+ * @returns `TokenOrComment | null`.
3152
3289
  */
3153
- type Envs$1 = Record<string, true>;
3154
- //#endregion
3155
- //#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
3156
- // ==================================================================================================
3157
- // JSON Schema Draft 04
3158
- // ==================================================================================================
3290
+ declare function getTokenOrCommentBefore(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
3159
3291
  /**
3160
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
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`.
3161
3298
  */
3162
- type JSONSchema4TypeName = "string" //
3163
- | "number" | "integer" | "boolean" | "object" | "array" | "null" | "any";
3299
+ declare function getTokensBefore<Options extends CountOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3164
3300
  /**
3165
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
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.
3166
3307
  */
3167
- type JSONSchema4Type = string //
3168
- | number | boolean | JSONSchema4Object | JSONSchema4Array | null;
3169
- // Workaround for infinite type recursion
3170
- interface JSONSchema4Object {
3171
- [key: string]: JSONSchema4Type;
3172
- }
3173
- // Workaround for infinite type recursion
3174
- // https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
3175
- interface JSONSchema4Array extends Array<JSONSchema4Type> {}
3308
+ declare function getTokenAfter<Options extends SkipOptions | number | FilterFn | null | undefined>(nodeOrToken: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
3176
3309
  /**
3177
- * Meta schema
3310
+ * Get the token that follows a given node or token.
3178
3311
  *
3179
- * Recommended values:
3180
- * - 'http://json-schema.org/schema#'
3181
- * - 'http://json-schema.org/hyper-schema#'
3182
- * - 'http://json-schema.org/draft-04/schema#'
3183
- * - 'http://json-schema.org/draft-04/hyper-schema#'
3184
- * - 'http://json-schema.org/draft-03/schema#'
3185
- * - 'http://json-schema.org/draft-03/hyper-schema#'
3312
+ * @deprecated Use `sourceCode.getTokenAfter` with `includeComments: true` instead.
3186
3313
  *
3187
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
3314
+ * @param nodeOrToken The AST node or token.
3315
+ * @param skip - Number of tokens to skip.
3316
+ * @returns `TokenOrComment | null`.
3188
3317
  */
3189
- type JSONSchema4Version = string;
3318
+ declare function getTokenOrCommentAfter(nodeOrToken: NodeOrToken, skip?: number): TokenOrComment | null;
3190
3319
  /**
3191
- * JSON Schema V4
3192
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-04
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>[];
3328
+ /**
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`.
3193
3334
  */
3194
- interface JSONSchema4 {
3195
- id?: string | undefined;
3196
- $ref?: string | undefined;
3197
- $schema?: JSONSchema4Version | undefined;
3198
- /**
3199
- * This attribute is a string that provides a short description of the
3200
- * instance property.
3201
- *
3202
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
3203
- */
3204
- title?: string | undefined;
3205
- /**
3206
- * This attribute is a string that provides a full description of the of
3207
- * purpose the instance property.
3208
- *
3209
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
3210
- */
3211
- description?: string | undefined;
3212
- default?: JSONSchema4Type | undefined;
3213
- multipleOf?: number | undefined;
3214
- maximum?: number | undefined;
3215
- exclusiveMaximum?: boolean | undefined;
3216
- minimum?: number | undefined;
3217
- exclusiveMinimum?: boolean | undefined;
3218
- maxLength?: number | undefined;
3219
- minLength?: number | undefined;
3220
- pattern?: string | undefined;
3221
- /**
3222
- * May only be defined when "items" is defined, and is a tuple of JSONSchemas.
3223
- *
3224
- * This provides a definition for additional items in an array instance
3225
- * when tuple definitions of the items is provided. This can be false
3226
- * to indicate additional items in the array are not allowed, or it can
3227
- * be a schema that defines the schema of the additional items.
3228
- *
3229
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
3230
- */
3231
- additionalItems?: boolean | JSONSchema4 | undefined;
3232
- /**
3233
- * This attribute defines the allowed items in an instance array, and
3234
- * MUST be a schema or an array of schemas. The default value is an
3235
- * empty schema which allows any value for items in the instance array.
3236
- *
3237
- * When this attribute value is a schema and the instance value is an
3238
- * array, then all the items in the array MUST be valid according to the
3239
- * schema.
3240
- *
3241
- * When this attribute value is an array of schemas and the instance
3242
- * value is an array, each position in the instance array MUST conform
3243
- * to the schema in the corresponding position for this array. This
3244
- * called tuple typing. When tuple typing is used, additional items are
3245
- * allowed, disallowed, or constrained by the "additionalItems"
3246
- * (Section 5.6) attribute using the same rules as
3247
- * "additionalProperties" (Section 5.4) for objects.
3248
- *
3249
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
3250
- */
3251
- items?: JSONSchema4 | JSONSchema4[] | undefined;
3252
- maxItems?: number | undefined;
3253
- minItems?: number | undefined;
3254
- uniqueItems?: boolean | undefined;
3255
- maxProperties?: number | undefined;
3256
- minProperties?: number | undefined;
3257
- /**
3258
- * This attribute indicates if the instance must have a value, and not
3259
- * be undefined. This is false by default, making the instance
3260
- * optional.
3261
- *
3262
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
3263
- */
3264
- required?: boolean | string[] | undefined;
3265
- /**
3266
- * This attribute defines a schema for all properties that are not
3267
- * explicitly defined in an object type definition. If specified, the
3268
- * value MUST be a schema or a boolean. If false is provided, no
3269
- * additional properties are allowed beyond the properties defined in
3270
- * the schema. The default value is an empty schema which allows any
3271
- * value for additional properties.
3272
- *
3273
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
3274
- */
3275
- additionalProperties?: boolean | JSONSchema4 | undefined;
3276
- definitions?: {
3277
- [k: string]: JSONSchema4;
3278
- } | undefined;
3279
- /**
3280
- * This attribute is an object with property definitions that define the
3281
- * valid values of instance object property values. When the instance
3282
- * value is an object, the property values of the instance object MUST
3283
- * conform to the property definitions in this object. In this object,
3284
- * each property definition's value MUST be a schema, and the property's
3285
- * name MUST be the name of the instance property that it defines. The
3286
- * instance property value MUST be valid according to the schema from
3287
- * the property definition. Properties are considered unordered, the
3288
- * order of the instance properties MAY be in any order.
3289
- *
3290
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
3291
- */
3292
- properties?: {
3293
- [k: string]: JSONSchema4;
3294
- } | undefined;
3295
- /**
3296
- * This attribute is an object that defines the schema for a set of
3297
- * property names of an object instance. The name of each property of
3298
- * this attribute's object is a regular expression pattern in the ECMA
3299
- * 262/Perl 5 format, while the value is a schema. If the pattern
3300
- * matches the name of a property on the instance object, the value of
3301
- * the instance's property MUST be valid against the pattern name's
3302
- * schema value.
3303
- *
3304
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
3305
- */
3306
- patternProperties?: {
3307
- [k: string]: JSONSchema4;
3308
- } | undefined;
3309
- dependencies?: {
3310
- [k: string]: JSONSchema4 | string[];
3311
- } | undefined;
3312
- /**
3313
- * This provides an enumeration of all possible values that are valid
3314
- * for the instance property. This MUST be an array, and each item in
3315
- * the array represents a possible value for the instance value. If
3316
- * this attribute is defined, the instance value MUST be one of the
3317
- * values in the array in order for the schema to be valid.
3318
- *
3319
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
3320
- */
3321
- enum?: JSONSchema4Type[] | undefined;
3322
- /**
3323
- * A single type, or a union of simple types
3324
- */
3325
- type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
3326
- allOf?: JSONSchema4[] | undefined;
3327
- anyOf?: JSONSchema4[] | undefined;
3328
- oneOf?: JSONSchema4[] | undefined;
3329
- not?: JSONSchema4 | undefined;
3330
- /**
3331
- * The value of this property MUST be another schema which will provide
3332
- * a base schema which the current schema will inherit from. The
3333
- * inheritance rules are such that any instance that is valid according
3334
- * to the current schema MUST be valid according to the referenced
3335
- * schema. This MAY also be an array, in which case, the instance MUST
3336
- * be valid for all the schemas in the array. A schema that extends
3337
- * another schema MAY define additional attributes, constrain existing
3338
- * attributes, or add other constraints.
3339
- *
3340
- * Conceptually, the behavior of extends can be seen as validating an
3341
- * instance against all constraints in the extending schema as well as
3342
- * the extended schema(s).
3343
- *
3344
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
3345
- */
3346
- extends?: string | string[] | undefined;
3347
- /**
3348
- * @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-5.6
3349
- */
3350
- [k: string]: any;
3351
- format?: string | undefined;
3352
- }
3353
- //#endregion
3354
- //#region src-js/plugins/options.d.ts
3355
3335
  /**
3356
- * Options for a rule on a file.
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`.
3357
3341
  */
3358
- type Options = JsonValue[];
3342
+ declare function getTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3359
3343
  /**
3360
- * Schema describing valid options for a rule.
3361
- * `schema` property of `RuleMeta`.
3362
- *
3363
- * Can be one of:
3364
- * - `JSONSchema4` - Full JSON Schema object (must have `type: "array"` at root).
3365
- * - `JSONSchema4[]` - Array shorthand where each element describes corresponding options element.
3366
- * - `false` - Opts out of schema validation (not recommended).
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.
3367
3351
  */
3368
- type RuleOptionsSchema = JSONSchema4 | JSONSchema4[] | false;
3369
- //#endregion
3370
- //#region src-js/plugins/fix.d.ts
3371
- type FixFn = (fixer: Fixer) => Fix | Array<Fix | null | undefined> | IterableIterator<Fix | null | undefined> | null | undefined;
3352
+ declare function getFirstTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
3372
3353
  /**
3373
- * Fix, as returned by `fix` function.
3374
- *
3375
- * `range` offsets are relative to start of the source text.
3376
- * When the file has a BOM, they are relative to the start of the source text *without* the BOM.
3377
- *
3378
- * To represent a position *before* a BOM, -1 is used to mean "before the BOM".
3379
- * ESLint's `unicode-bom` rule produces a fix `{ range: [-1, 0], text: "" }` to remove a BOM.
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`.
3380
3361
  */
3381
- interface Fix {
3382
- range: Range;
3383
- text: string;
3384
- }
3385
- declare const FIXER: Readonly<{
3386
- insertTextBefore(nodeOrToken: Ranged, text: string): Fix;
3387
- insertTextBeforeRange(range: Range, text: string): Fix;
3388
- insertTextAfter(nodeOrToken: Ranged, text: string): Fix;
3389
- insertTextAfterRange(range: Range, text: string): Fix;
3390
- remove(nodeOrToken: Ranged): Fix;
3391
- removeRange(range: Range): Fix;
3392
- replaceText(nodeOrToken: Ranged, text: string): Fix;
3393
- replaceTextRange(range: Range, text: string): Fix;
3394
- }>;
3395
- type Fixer = typeof FIXER;
3396
- //#endregion
3397
- //#region src-js/plugins/report.d.ts
3362
+ declare function getFirstTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3398
3363
  /**
3399
- * Diagnostic object.
3400
- * Passed to `Context#report()`.
3401
- *
3402
- * - Either `message` or `messageId` property must be provided.
3403
- * - Either `node` or `loc` property must be provided.
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.
3404
3371
  */
3405
- type Diagnostic = RequireAtLeastOne<RequireAtLeastOne<DiagnosticBase, "node" | "loc">, "message" | "messageId">;
3406
- interface DiagnosticBase {
3407
- message?: string | null | undefined;
3408
- messageId?: string | null | undefined;
3409
- node?: Ranged;
3410
- loc?: LocationWithOptionalEnd | LineColumn;
3411
- data?: DiagnosticData | null | undefined;
3412
- fix?: FixFn;
3413
- suggest?: Suggestion[] | null | undefined;
3414
- }
3372
+ declare function getLastTokenBetween<Options extends SkipOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, skipOptions?: Options): TokenResult<Options> | null;
3415
3373
  /**
3416
- * Location with `end` property optional.
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`.
3417
3381
  */
3418
- interface LocationWithOptionalEnd {
3419
- start: LineColumn;
3420
- end?: LineColumn | null | undefined;
3421
- }
3382
+ declare function getLastTokensBetween<Options extends CountOptions | number | FilterFn | null | undefined>(left: NodeOrToken, right: NodeOrToken, countOptions?: Options): TokenResult<Options>[];
3422
3383
  /**
3423
- * Data to interpolate into a diagnostic message.
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.
3424
3388
  */
3425
- type DiagnosticData = Record<string, string | number | boolean | bigint | null | undefined>;
3389
+ declare function getTokenByRangeStart<Options extends RangeOptions | null | undefined>(offset: number, rangeOptions?: Options): TokenResult<Options> | null;
3426
3390
  /**
3427
- * Suggested fix.
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.
3428
3403
  */
3429
- type Suggestion = RequireAtLeastOne<SuggestionBase, "desc" | "messageId">;
3430
- interface SuggestionBase {
3431
- desc?: string;
3432
- messageId?: string;
3433
- data?: DiagnosticData | null | undefined;
3434
- fix: FixFn;
3435
- }
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;
3436
3444
  //#endregion
3437
3445
  //#region src-js/plugins/source_code.d.ts
3438
3446
  declare const SOURCE_CODE: Readonly<{
@@ -3455,12 +3463,7 @@ declare const SOURCE_CODE: Readonly<{
3455
3463
  /**
3456
3464
  * `ScopeManager` for the file.
3457
3465
  */
3458
- readonly scopeManager: Readonly<{
3459
- readonly scopes: Scope[];
3460
- readonly globalScope: Scope | null;
3461
- getDeclaredVariables(node: Node): Variable[];
3462
- acquire(node: Node, inner?: boolean): Scope | null;
3463
- }>;
3466
+ readonly scopeManager: ScopeManager;
3464
3467
  /**
3465
3468
  * Visitor keys to traverse this AST.
3466
3469
  */
@@ -3498,7 +3501,7 @@ declare const SOURCE_CODE: Readonly<{
3498
3501
  * @returns All the ancestor nodes in the AST, not including the provided node,
3499
3502
  * starting from the root node at index 0 and going inwards to the parent node.
3500
3503
  */
3501
- getAncestors(node: Node$1): Node$1[];
3504
+ getAncestors(node: Node): Node[];
3502
3505
  /**
3503
3506
  * Get source text as array of lines, split according to specification's definition of line breaks.
3504
3507
  */
@@ -3542,6 +3545,256 @@ declare const SOURCE_CODE: Readonly<{
3542
3545
  type SourceCode = typeof SOURCE_CODE;
3543
3546
  //#endregion
3544
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>;
3545
3798
  declare const FILE_CONTEXT: Readonly<{
3546
3799
  /**
3547
3800
  * Absolute path of the file being linted.
@@ -3576,61 +3829,7 @@ declare const FILE_CONTEXT: Readonly<{
3576
3829
  /**
3577
3830
  * Source code of the file being linted.
3578
3831
  */
3579
- readonly sourceCode: Readonly<{
3580
- readonly text: string;
3581
- readonly hasBOM: boolean;
3582
- readonly ast: Program;
3583
- isESTree: true;
3584
- readonly scopeManager: Readonly<{
3585
- readonly scopes: Scope[];
3586
- readonly globalScope: Scope | null;
3587
- getDeclaredVariables(node: Node): Variable[];
3588
- acquire(node: Node, inner?: boolean): Scope | null;
3589
- }>;
3590
- readonly visitorKeys: Readonly<Record<string, readonly string[]>>;
3591
- parserServices: Readonly<Record<string, unknown>>;
3592
- readonly lines: string[];
3593
- readonly lineStartIndices: number[];
3594
- readonly tokensAndComments: (TokenType | CommentType)[];
3595
- getText(node?: Ranged | null, beforeCount?: number | null, afterCount?: number | null): string;
3596
- getAncestors(node: Node$1): Node$1[];
3597
- getLines(): string[];
3598
- getRange: typeof getRange;
3599
- getLoc: typeof getLoc;
3600
- getNodeByRangeIndex: typeof getNodeByRangeIndex;
3601
- getLocFromIndex: typeof getLineColumnFromOffset;
3602
- getIndexFromLoc: typeof getOffsetFromLineColumn;
3603
- getAllComments: typeof getAllComments;
3604
- getCommentsBefore: typeof getCommentsBefore;
3605
- getCommentsAfter: typeof getCommentsAfter;
3606
- getCommentsInside: typeof getCommentsInside;
3607
- commentsExistBetween: typeof commentsExistBetween;
3608
- getJSDocComment: typeof getJSDocComment;
3609
- isGlobalReference: typeof isGlobalReference;
3610
- getDeclaredVariables: typeof getDeclaredVariables;
3611
- getScope: typeof getScope;
3612
- markVariableAsUsed: typeof markVariableAsUsed;
3613
- getTokens: typeof getTokens;
3614
- getFirstToken: typeof getFirstToken;
3615
- getFirstTokens: typeof getFirstTokens;
3616
- getLastToken: typeof getLastToken;
3617
- getLastTokens: typeof getLastTokens;
3618
- getTokenBefore: typeof getTokenBefore;
3619
- getTokenOrCommentBefore: typeof getTokenOrCommentBefore;
3620
- getTokensBefore: typeof getTokensBefore;
3621
- getTokenAfter: typeof getTokenAfter;
3622
- getTokenOrCommentAfter: typeof getTokenOrCommentAfter;
3623
- getTokensAfter: typeof getTokensAfter;
3624
- getTokensBetween: typeof getTokensBetween;
3625
- getFirstTokenBetween: typeof getFirstTokenBetween;
3626
- getFirstTokensBetween: typeof getFirstTokensBetween;
3627
- getLastTokenBetween: typeof getLastTokenBetween;
3628
- getLastTokensBetween: typeof getLastTokensBetween;
3629
- getTokenByRangeStart: typeof getTokenByRangeStart;
3630
- isSpaceBetween: typeof isSpaceBetween;
3631
- isSpaceBetweenTokens: typeof isSpaceBetweenTokens;
3632
- getDisableDirectives: typeof getDisableDirectives;
3633
- }>;
3832
+ readonly sourceCode: SourceCode;
3634
3833
  /**
3635
3834
  * Get source code of the file being linted.
3636
3835
  * @returns Source code of the file being linted.
@@ -3640,256 +3839,11 @@ declare const FILE_CONTEXT: Readonly<{
3640
3839
  /**
3641
3840
  * Language options used when parsing this file.
3642
3841
  */
3643
- readonly languageOptions: Readonly<{
3644
- /**
3645
- * Source type of the file being linted.
3646
- */
3647
- readonly sourceType: ModuleKind;
3648
- /**
3649
- * ECMAScript version of the file being linted.
3650
- */
3651
- ecmaVersion: number;
3652
- /**
3653
- * Parser used to parse the file being linted.
3654
- */
3655
- parser: Readonly<{
3656
- /**
3657
- * Parser name.
3658
- */
3659
- name: "oxlint";
3660
- /**
3661
- * Parser version.
3662
- */
3663
- version: string;
3664
- /**
3665
- * Parse code into an AST.
3666
- * @param code - Code to parse
3667
- * @param options? - Parser options
3668
- * @returns AST
3669
- */
3670
- parse(code: string, options?: Record<string, unknown>): Program;
3671
- /**
3672
- * Visitor keys for AST nodes.
3673
- */
3674
- VisitorKeys: Readonly<{
3675
- DebuggerStatement: readonly never[];
3676
- EmptyStatement: readonly never[];
3677
- Literal: readonly never[];
3678
- PrivateIdentifier: readonly never[];
3679
- Super: readonly never[];
3680
- TemplateElement: readonly never[];
3681
- ThisExpression: readonly never[];
3682
- JSXClosingFragment: readonly never[];
3683
- JSXEmptyExpression: readonly never[];
3684
- JSXIdentifier: readonly never[];
3685
- JSXOpeningFragment: readonly never[];
3686
- JSXText: readonly never[];
3687
- TSAnyKeyword: readonly never[];
3688
- TSBigIntKeyword: readonly never[];
3689
- TSBooleanKeyword: readonly never[];
3690
- TSIntrinsicKeyword: readonly never[];
3691
- TSJSDocUnknownType: readonly never[];
3692
- TSNeverKeyword: readonly never[];
3693
- TSNullKeyword: readonly never[];
3694
- TSNumberKeyword: readonly never[];
3695
- TSObjectKeyword: readonly never[];
3696
- TSStringKeyword: readonly never[];
3697
- TSSymbolKeyword: readonly never[];
3698
- TSThisType: readonly never[];
3699
- TSUndefinedKeyword: readonly never[];
3700
- TSUnknownKeyword: readonly never[];
3701
- TSVoidKeyword: readonly never[];
3702
- AccessorProperty: readonly string[];
3703
- ArrayExpression: readonly string[];
3704
- ArrayPattern: readonly string[];
3705
- ArrowFunctionExpression: readonly string[];
3706
- AssignmentExpression: readonly string[];
3707
- AssignmentPattern: readonly string[];
3708
- AwaitExpression: readonly string[];
3709
- BinaryExpression: readonly string[];
3710
- BlockStatement: readonly string[];
3711
- BreakStatement: readonly string[];
3712
- CallExpression: readonly string[];
3713
- CatchClause: readonly string[];
3714
- ChainExpression: readonly string[];
3715
- ClassBody: readonly string[];
3716
- ClassDeclaration: readonly string[];
3717
- ClassExpression: readonly string[];
3718
- ConditionalExpression: readonly string[];
3719
- ContinueStatement: readonly string[];
3720
- Decorator: readonly string[];
3721
- DoWhileStatement: readonly string[];
3722
- ExportAllDeclaration: readonly string[];
3723
- ExportDefaultDeclaration: readonly string[];
3724
- ExportNamedDeclaration: readonly string[];
3725
- ExportSpecifier: readonly string[];
3726
- ExpressionStatement: readonly string[];
3727
- ForInStatement: readonly string[];
3728
- ForOfStatement: readonly string[];
3729
- ForStatement: readonly string[];
3730
- FunctionDeclaration: readonly string[];
3731
- FunctionExpression: readonly string[];
3732
- Identifier: readonly string[];
3733
- IfStatement: readonly string[];
3734
- ImportAttribute: readonly string[];
3735
- ImportDeclaration: readonly string[];
3736
- ImportDefaultSpecifier: readonly string[];
3737
- ImportExpression: readonly string[];
3738
- ImportNamespaceSpecifier: readonly string[];
3739
- ImportSpecifier: readonly string[];
3740
- LabeledStatement: readonly string[];
3741
- LogicalExpression: readonly string[];
3742
- MemberExpression: readonly string[];
3743
- MetaProperty: readonly string[];
3744
- MethodDefinition: readonly string[];
3745
- NewExpression: readonly string[];
3746
- ObjectExpression: readonly string[];
3747
- ObjectPattern: readonly string[];
3748
- ParenthesizedExpression: readonly string[];
3749
- Program: readonly string[];
3750
- Property: readonly string[];
3751
- PropertyDefinition: readonly string[];
3752
- RestElement: readonly string[];
3753
- ReturnStatement: readonly string[];
3754
- SequenceExpression: readonly string[];
3755
- SpreadElement: readonly string[];
3756
- StaticBlock: readonly string[];
3757
- SwitchCase: readonly string[];
3758
- SwitchStatement: readonly string[];
3759
- TaggedTemplateExpression: readonly string[];
3760
- TemplateLiteral: readonly string[];
3761
- ThrowStatement: readonly string[];
3762
- TryStatement: readonly string[];
3763
- UnaryExpression: readonly string[];
3764
- UpdateExpression: readonly string[];
3765
- V8IntrinsicExpression: readonly string[];
3766
- VariableDeclaration: readonly string[];
3767
- VariableDeclarator: readonly string[];
3768
- WhileStatement: readonly string[];
3769
- WithStatement: readonly string[];
3770
- YieldExpression: readonly string[];
3771
- JSXAttribute: readonly string[];
3772
- JSXClosingElement: readonly string[];
3773
- JSXElement: readonly string[];
3774
- JSXExpressionContainer: readonly string[];
3775
- JSXFragment: readonly string[];
3776
- JSXMemberExpression: readonly string[];
3777
- JSXNamespacedName: readonly string[];
3778
- JSXOpeningElement: readonly string[];
3779
- JSXSpreadAttribute: readonly string[];
3780
- JSXSpreadChild: readonly string[];
3781
- TSAbstractAccessorProperty: readonly string[];
3782
- TSAbstractMethodDefinition: readonly string[];
3783
- TSAbstractPropertyDefinition: readonly string[];
3784
- TSArrayType: readonly string[];
3785
- TSAsExpression: readonly string[];
3786
- TSCallSignatureDeclaration: readonly string[];
3787
- TSClassImplements: readonly string[];
3788
- TSConditionalType: readonly string[];
3789
- TSConstructSignatureDeclaration: readonly string[];
3790
- TSConstructorType: readonly string[];
3791
- TSDeclareFunction: readonly string[];
3792
- TSEmptyBodyFunctionExpression: readonly string[];
3793
- TSEnumBody: readonly string[];
3794
- TSEnumDeclaration: readonly string[];
3795
- TSEnumMember: readonly string[];
3796
- TSExportAssignment: readonly string[];
3797
- TSExternalModuleReference: readonly string[];
3798
- TSFunctionType: readonly string[];
3799
- TSImportEqualsDeclaration: readonly string[];
3800
- TSImportType: readonly string[];
3801
- TSIndexSignature: readonly string[];
3802
- TSIndexedAccessType: readonly string[];
3803
- TSInferType: readonly string[];
3804
- TSInstantiationExpression: readonly string[];
3805
- TSInterfaceBody: readonly string[];
3806
- TSInterfaceDeclaration: readonly string[];
3807
- TSInterfaceHeritage: readonly string[];
3808
- TSIntersectionType: readonly string[];
3809
- TSJSDocNonNullableType: readonly string[];
3810
- TSJSDocNullableType: readonly string[];
3811
- TSLiteralType: readonly string[];
3812
- TSMappedType: readonly string[];
3813
- TSMethodSignature: readonly string[];
3814
- TSModuleBlock: readonly string[];
3815
- TSModuleDeclaration: readonly string[];
3816
- TSNamedTupleMember: readonly string[];
3817
- TSNamespaceExportDeclaration: readonly string[];
3818
- TSNonNullExpression: readonly string[];
3819
- TSOptionalType: readonly string[];
3820
- TSParameterProperty: readonly string[];
3821
- TSParenthesizedType: readonly string[];
3822
- TSPropertySignature: readonly string[];
3823
- TSQualifiedName: readonly string[];
3824
- TSRestType: readonly string[];
3825
- TSSatisfiesExpression: readonly string[];
3826
- TSTemplateLiteralType: readonly string[];
3827
- TSTupleType: readonly string[];
3828
- TSTypeAliasDeclaration: readonly string[];
3829
- TSTypeAnnotation: readonly string[];
3830
- TSTypeAssertion: readonly string[];
3831
- TSTypeLiteral: readonly string[];
3832
- TSTypeOperator: readonly string[];
3833
- TSTypeParameter: readonly string[];
3834
- TSTypeParameterDeclaration: readonly string[];
3835
- TSTypeParameterInstantiation: readonly string[];
3836
- TSTypePredicate: readonly string[];
3837
- TSTypeQuery: readonly string[];
3838
- TSTypeReference: readonly string[];
3839
- TSUnionType: readonly string[];
3840
- }>;
3841
- /**
3842
- * Ast node types.
3843
- */
3844
- readonly Syntax: Readonly<Record<string, string>>;
3845
- /**
3846
- * Latest ECMAScript version supported by parser.
3847
- */
3848
- latestEcmaVersion: 17;
3849
- /**
3850
- * ECMAScript versions supported by parser.
3851
- */
3852
- supportedEcmaVersions: readonly number[];
3853
- }>;
3854
- /**
3855
- * Parser options used to parse the file being linted.
3856
- */
3857
- parserOptions: Readonly<{
3858
- /**
3859
- * Source type of the file being linted.
3860
- */
3861
- readonly sourceType: ModuleKind;
3862
- /**
3863
- * ECMA features.
3864
- */
3865
- ecmaFeatures: Readonly<{
3866
- /**
3867
- * `true` if file was parsed as JSX.
3868
- */
3869
- readonly jsx: boolean;
3870
- /**
3871
- * `true` if file was parsed with top-level `return` statements allowed.
3872
- */
3873
- readonly globalReturn: boolean;
3874
- /**
3875
- * `true` if file was parsed as strict mode code.
3876
- */
3877
- readonly impliedStrict: boolean;
3878
- }>;
3879
- }>;
3880
- /**
3881
- * Globals defined for the file being linted.
3882
- */
3883
- readonly globals: Readonly<Globals$1>;
3884
- /**
3885
- * Environments defined for the file being linted.
3886
- */
3887
- readonly env: Readonly<Envs$1>;
3888
- }>;
3842
+ readonly languageOptions: LanguageOptions$1;
3889
3843
  /**
3890
3844
  * Settings for the file being linted.
3891
3845
  */
3892
- readonly settings: Readonly<JsonObject>;
3846
+ readonly settings: Readonly<Settings>;
3893
3847
  /**
3894
3848
  * Create a new object with the current object as the prototype and
3895
3849
  * the specified properties as its own properties.
@@ -4108,14 +4062,6 @@ interface CreateOnceRule {
4108
4062
  createOnce: (context: Context) => VisitorWithHooks;
4109
4063
  }
4110
4064
  //#endregion
4111
- //#region src-js/plugins/settings.d.ts
4112
- /**
4113
- * Settings for the file being linted.
4114
- *
4115
- * Settings are deserialized from JSON, so can only contain JSON-compatible values.
4116
- */
4117
- type Settings = JsonObject;
4118
- //#endregion
4119
4065
  //#region src-js/package/rule_tester.d.ts
4120
4066
  type DescribeFn = (text: string, fn: () => void) => void;
4121
4067
  type ItFn = ((text: string, fn: () => void) => void) & {