@oxlint/plugins 1.61.0 → 1.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +44 -26
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -241,7 +241,7 @@ type Options = JsonValue[];
|
|
|
241
241
|
*/
|
|
242
242
|
type RuleOptionsSchema = JSONSchema4 | JSONSchema4[] | false;
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
244
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-any.d.ts
|
|
245
245
|
/**
|
|
246
246
|
Returns a boolean for whether the given type is `any`.
|
|
247
247
|
|
|
@@ -272,7 +272,7 @@ const anyA = get(anyObject, 'a');
|
|
|
272
272
|
*/
|
|
273
273
|
type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
|
|
274
274
|
//#endregion
|
|
275
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
275
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-optional-key-of.d.ts
|
|
276
276
|
/**
|
|
277
277
|
Returns a boolean for whether the given key is an optional key of type.
|
|
278
278
|
|
|
@@ -315,7 +315,7 @@ type T5 = IsOptionalKeyOf<User | Admin, 'surname'>;
|
|
|
315
315
|
*/
|
|
316
316
|
type IsOptionalKeyOf<Type extends object, Key extends keyof Type> = IsAny<Type | Key> extends true ? never : Key extends keyof Type ? Type extends Record<Key, Type[Key]> ? false : true : false;
|
|
317
317
|
//#endregion
|
|
318
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
318
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/optional-keys-of.d.ts
|
|
319
319
|
/**
|
|
320
320
|
Extract all optional keys from the given type.
|
|
321
321
|
|
|
@@ -353,7 +353,7 @@ type OptionalKeysOf<Type extends object> = Type extends unknown // For distribut
|
|
|
353
353
|
? (keyof { [Key in keyof Type as IsOptionalKeyOf<Type, Key> extends false ? never : Key]: never }) & keyof Type // Intersect with `keyof Type` to ensure result of `OptionalKeysOf<Type>` is always assignable to `keyof Type`
|
|
354
354
|
: never;
|
|
355
355
|
//#endregion
|
|
356
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
356
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/required-keys-of.d.ts
|
|
357
357
|
/**
|
|
358
358
|
Extract all required keys from the given type.
|
|
359
359
|
|
|
@@ -387,7 +387,7 @@ const validator3 = createValidation<User>('luckyNumber', value => value > 0);
|
|
|
387
387
|
type RequiredKeysOf<Type extends object> = Type extends unknown // For distributing `Type`
|
|
388
388
|
? Exclude<keyof Type, OptionalKeysOf<Type>> : never;
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
390
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-never.d.ts
|
|
391
391
|
/**
|
|
392
392
|
Returns a boolean for whether the given type is `never`.
|
|
393
393
|
|
|
@@ -443,7 +443,7 @@ type B = IsTrueFixed<never>;
|
|
|
443
443
|
*/
|
|
444
444
|
type IsNever<T> = [T] extends [never] ? true : false;
|
|
445
445
|
//#endregion
|
|
446
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
446
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/if.d.ts
|
|
447
447
|
/**
|
|
448
448
|
An if-else-like type that resolves depending on whether the given `boolean` type is `true` or `false`.
|
|
449
449
|
|
|
@@ -538,7 +538,7 @@ type Works = IncludesWithoutIf<HundredZeroes, '1'>;
|
|
|
538
538
|
*/
|
|
539
539
|
type If<Type extends boolean, IfBranch, ElseBranch> = IsNever<Type> extends true ? ElseBranch : Type extends true ? IfBranch : ElseBranch;
|
|
540
540
|
//#endregion
|
|
541
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
541
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/internal/type.d.ts
|
|
542
542
|
/**
|
|
543
543
|
An if-else-like type that resolves depending on whether the given type is `any` or `never`.
|
|
544
544
|
|
|
@@ -585,7 +585,7 @@ type T2 = TrimLeftOptimised<NineHundredNinetyNineSpaces>;
|
|
|
585
585
|
*/
|
|
586
586
|
type IfNotAnyOrNever<T, IfNotAnyOrNever, IfAny = any, IfNever = never> = If<IsAny<T>, IfAny, If<IsNever<T>, IfNever, IfNotAnyOrNever>>;
|
|
587
587
|
//#endregion
|
|
588
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
588
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/simplify.d.ts
|
|
589
589
|
/**
|
|
590
590
|
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
|
|
591
591
|
|
|
@@ -646,7 +646,7 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
|
|
|
646
646
|
*/
|
|
647
647
|
type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
648
648
|
//#endregion
|
|
649
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
649
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/is-equal.d.ts
|
|
650
650
|
/**
|
|
651
651
|
Returns a boolean for whether the two given types are equal.
|
|
652
652
|
|
|
@@ -677,7 +677,7 @@ type IsEqual<A, B> = [A] extends [B] ? [B] extends [A] ? _IsEqual<A, B> : false
|
|
|
677
677
|
// This version fails the `equalWrappedTupleIntersectionToBeNeverAndNeverExpanded` test in `test-d/is-equal.ts`.
|
|
678
678
|
type _IsEqual<A, B> = (<G>() => G extends A & G | G ? 1 : 2) extends (<G>() => G extends B & G | G ? 1 : 2) ? true : false;
|
|
679
679
|
//#endregion
|
|
680
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
680
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/omit-index-signature.d.ts
|
|
681
681
|
/**
|
|
682
682
|
Omit any index signatures from the given object type, leaving only explicitly defined properties.
|
|
683
683
|
|
|
@@ -771,7 +771,7 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
|
|
|
771
771
|
*/
|
|
772
772
|
type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
|
|
773
773
|
//#endregion
|
|
774
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
774
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/pick-index-signature.d.ts
|
|
775
775
|
/**
|
|
776
776
|
Pick only index signatures from the given object type, leaving out all explicitly defined properties.
|
|
777
777
|
|
|
@@ -819,7 +819,7 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
|
|
|
819
819
|
*/
|
|
820
820
|
type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
|
|
821
821
|
//#endregion
|
|
822
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
822
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/merge.d.ts
|
|
823
823
|
// Merges two objects without worrying about index signatures.
|
|
824
824
|
type SimpleMerge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source>;
|
|
825
825
|
/**
|
|
@@ -891,7 +891,7 @@ type Merge<Destination, Source> = Destination extends unknown // For distributin
|
|
|
891
891
|
// Should never happen
|
|
892
892
|
type _Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
|
|
893
893
|
//#endregion
|
|
894
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
894
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/internal/object.d.ts
|
|
895
895
|
/**
|
|
896
896
|
Merges user specified options with default options.
|
|
897
897
|
|
|
@@ -946,7 +946,7 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
|
|
|
946
946
|
*/
|
|
947
947
|
type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = If<IsAny<SpecifiedOptions>, Defaults, If<IsNever<SpecifiedOptions>, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? undefined extends SpecifiedOptions[Key] ? never : Key : Key]: SpecifiedOptions[Key] }> & Required<Options>>>>;
|
|
948
948
|
//#endregion
|
|
949
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
949
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/except.d.ts
|
|
950
950
|
/**
|
|
951
951
|
Filter out keys from an object.
|
|
952
952
|
|
|
@@ -1044,9 +1044,9 @@ type PostPayloadFixed = Except<UserData, 'email'>;
|
|
|
1044
1044
|
type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {}> = _Except<ObjectType, KeysType, ApplyDefaultOptions<ExceptOptions, DefaultExceptOptions, Options>>;
|
|
1045
1045
|
type _Except<ObjectType, KeysType extends keyof ObjectType, Options extends Required<ExceptOptions>> = { [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType] } & (Options['requireExactProps'] extends true ? Partial<Record<KeysType, never>> : {});
|
|
1046
1046
|
//#endregion
|
|
1047
|
-
//#region ../../node_modules/.pnpm/type-fest@5.
|
|
1047
|
+
//#region ../../node_modules/.pnpm/type-fest@5.6.0/node_modules/type-fest/source/require-at-least-one.d.ts
|
|
1048
1048
|
/**
|
|
1049
|
-
Create a type that requires at least one of the given keys
|
|
1049
|
+
Create a type that requires at least one of the given keys, while keeping the remaining keys as is.
|
|
1050
1050
|
|
|
1051
1051
|
@example
|
|
1052
1052
|
```
|
|
@@ -1068,10 +1068,9 @@ const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
|
|
|
1068
1068
|
*/
|
|
1069
1069
|
type RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, If<IsNever<KeysType>, never, _RequireAtLeastOne<ObjectType, If<IsAny<KeysType>, keyof ObjectType, KeysType>>>>;
|
|
1070
1070
|
type _RequireAtLeastOne<ObjectType, KeysType extends keyof ObjectType> = { // For each `Key` in `KeysType` make a mapped type:
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & // 3. Add the remaining keys not in `KeysType`
|
|
1074
|
-
Except<ObjectType, KeysType>;
|
|
1071
|
+
// 2. Make all other keys in `KeysType` optional
|
|
1072
|
+
[Key in KeysType]-?: Required<Pick<ObjectType, Key>> // 1. Make `Key`'s type required
|
|
1073
|
+
& Partial<Pick<ObjectType, Exclude<KeysType, Key>>> }[KeysType] & Except<ObjectType, KeysType>; // 3. Add the remaining keys not in `KeysType`
|
|
1075
1074
|
//#endregion
|
|
1076
1075
|
//#region src-js/plugins/tokens.d.ts
|
|
1077
1076
|
/**
|
|
@@ -1133,11 +1132,11 @@ interface CommentType extends Span {
|
|
|
1133
1132
|
value: string;
|
|
1134
1133
|
}
|
|
1135
1134
|
declare namespace types_d_exports {
|
|
1136
|
-
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, 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 };
|
|
1135
|
+
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 };
|
|
1137
1136
|
}
|
|
1138
1137
|
interface Program extends Span {
|
|
1139
1138
|
type: "Program";
|
|
1140
|
-
body: Array<Directive | Statement>;
|
|
1139
|
+
body: Array<Directive$1 | Statement>;
|
|
1141
1140
|
sourceType: ModuleKind;
|
|
1142
1141
|
comments: CommentType[];
|
|
1143
1142
|
tokens: TokenType[];
|
|
@@ -1416,7 +1415,7 @@ interface ParenthesizedExpression extends Span {
|
|
|
1416
1415
|
parent: Node$1;
|
|
1417
1416
|
}
|
|
1418
1417
|
type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | WithStatement | Declaration | ModuleDeclaration;
|
|
1419
|
-
interface Directive extends Span {
|
|
1418
|
+
interface Directive$1 extends Span {
|
|
1420
1419
|
type: "ExpressionStatement";
|
|
1421
1420
|
expression: StringLiteral;
|
|
1422
1421
|
directive: string;
|
|
@@ -1648,7 +1647,7 @@ interface TSParameterProperty extends Span {
|
|
|
1648
1647
|
}
|
|
1649
1648
|
interface FunctionBody extends Span {
|
|
1650
1649
|
type: "BlockStatement";
|
|
1651
|
-
body: Array<Directive | Statement>;
|
|
1650
|
+
body: Array<Directive$1 | Statement>;
|
|
1652
1651
|
parent: Node$1;
|
|
1653
1652
|
}
|
|
1654
1653
|
interface ArrowFunctionExpression extends Span {
|
|
@@ -2278,7 +2277,7 @@ interface TSGlobalDeclaration extends Span {
|
|
|
2278
2277
|
}
|
|
2279
2278
|
interface TSModuleBlock extends Span {
|
|
2280
2279
|
type: "TSModuleBlock";
|
|
2281
|
-
body: Array<Directive | Statement>;
|
|
2280
|
+
body: Array<Directive$1 | Statement>;
|
|
2282
2281
|
parent: Node$1;
|
|
2283
2282
|
}
|
|
2284
2283
|
interface TSTypeLiteral extends Span {
|
|
@@ -2425,7 +2424,7 @@ type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+
|
|
|
2425
2424
|
type LogicalOperator = "||" | "&&" | "??";
|
|
2426
2425
|
type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
2427
2426
|
type UpdateOperator = "++" | "--";
|
|
2428
|
-
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 | 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;
|
|
2427
|
+
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;
|
|
2429
2428
|
//#endregion
|
|
2430
2429
|
//#region src-js/generated/visitor.d.ts
|
|
2431
2430
|
// To understand why we need the "Bivariance hack", see: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/20219
|
|
@@ -2989,6 +2988,24 @@ declare function commentsExistBetween(nodeOrToken1: NodeOrToken, nodeOrToken2: N
|
|
|
2989
2988
|
*/
|
|
2990
2989
|
declare function getJSDocComment(node: Node): CommentType | null;
|
|
2991
2990
|
//#endregion
|
|
2991
|
+
//#region src-js/plugins/directives.d.ts
|
|
2992
|
+
interface Problem {
|
|
2993
|
+
ruleId: string | null;
|
|
2994
|
+
message: string;
|
|
2995
|
+
loc: Location;
|
|
2996
|
+
}
|
|
2997
|
+
type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
|
|
2998
|
+
interface Directive {
|
|
2999
|
+
type: DirectiveType;
|
|
3000
|
+
node: CommentType;
|
|
3001
|
+
value: string;
|
|
3002
|
+
justification?: string;
|
|
3003
|
+
}
|
|
3004
|
+
declare function getDisableDirectives(): {
|
|
3005
|
+
problems: Problem[];
|
|
3006
|
+
directives: Directive[];
|
|
3007
|
+
};
|
|
3008
|
+
//#endregion
|
|
2992
3009
|
//#region src-js/plugins/scope.d.ts
|
|
2993
3010
|
interface Scope {
|
|
2994
3011
|
type: ScopeType;
|
|
@@ -3451,6 +3468,7 @@ declare const SOURCE_CODE: Readonly<{
|
|
|
3451
3468
|
getTokenByRangeStart: typeof getTokenByRangeStart;
|
|
3452
3469
|
isSpaceBetween: typeof isSpaceBetween;
|
|
3453
3470
|
isSpaceBetweenTokens: typeof isSpaceBetweenTokens;
|
|
3471
|
+
getDisableDirectives: typeof getDisableDirectives;
|
|
3454
3472
|
}>;
|
|
3455
3473
|
type SourceCode = typeof SOURCE_CODE;
|
|
3456
3474
|
//#endregion
|