text
stringlengths
2
4k
pression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXAttribute | JSXElement | JSXExpressionContainer | JSXFragment | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; JSXIdentifier: JSXAttribute | JSXClosingElement | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement; JSXMemberExpression: JSXClosingElement | JSXMemberExpression | JSXOpeningElement; JSXNamespacedName: CallExpression | JSXAttribute | JSXClosingElement | JSXOpeningElement | NewExpression | OptionalCallExpression; JSXOpeningElement: JSXElement; JSXOpeningFragment: JSXFragment; JSXSpreadAttribute: JSXOpeningElement; JSXSpreadChild: JSXElement | JSXFragment; JSXText: JSXElement | JSXFragment; LabeledStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; LogicalExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; MemberExpression: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression |
ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; MetaProperty: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; MixedTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; ModuleExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; NewExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty |
ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; Noop: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | RestElement | TSDeclareFunction | TSDeclareMethod; NullLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; NullLiteralTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; NullableTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; NumberLiteral: null; NumberLiteralTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | Obje
ctTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; NumberTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; NumericLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | EnumNumberMember | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSLiteralType | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ObjectExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ObjectMethod: ObjectExpression; ObjectPattern: ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | CatchClause | ClassMethod | ClassPrivateMethod | ForInStatement | ForOfStatement | FunctionDeclaration | FunctionExpression | ObjectMethod | ObjectProperty | RestElement | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSFunctionType | TSMethodSignature | VariableDeclarator; ObjectProperty: ObjectExpression | ObjectPattern | RecordExpression;
ObjectTypeAnnotation: ArrayTypeAnnotation | DeclareClass | DeclareExportDeclaration | DeclareInterface | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; ObjectTypeCallProperty: DeclareExportDeclaration | DeclaredPredicate | ObjectTypeAnnotation; ObjectTypeIndexer: DeclareExportDeclaration | DeclaredPredicate | ObjectTypeAnnotation; ObjectTypeInternalSlot: DeclareExportDeclaration | DeclaredPredicate | ObjectTypeAnnotation; ObjectTypeProperty: DeclareExportDeclaration | DeclaredPredicate | ObjectTypeAnnotation; ObjectTypeSpreadProperty: DeclareExportDeclaration | DeclaredPredicate | ObjectTypeAnnotation; OpaqueType: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; OptionalCallExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; OptionalIndexedAccessType: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; OptionalMemberExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpressi
on | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ParenthesizedExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; PipelineBareFunction: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; PipelinePrimaryTopicReference: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration |
TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; PipelineTopicExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; Placeholder: Node; PrivateName: BinaryExpression | ClassAccessorProperty | ClassPrivateMethod | ClassPrivateProperty | MemberExpression | ObjectProperty; Program: File | ModuleExpression; QualifiedTypeIdentifier: DeclareExportDeclaration | DeclaredPredicate | GenericTypeAnnotation | InterfaceExtends | QualifiedTypeIdentifier; RecordExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; RegExpLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBa
reFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; RegexLiteral: null; RestElement: ArrayPattern | ArrowFunctionExpression | AssignmentExpression | ClassMethod | ClassPrivateMethod | ForInStatement | ForOfStatement | FunctionDeclaration | FunctionExpression | ObjectMethod | ObjectPattern | ObjectProperty | RestElement | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSFunctionType | TSMethodSignature | VariableDeclarator; RestProperty: null; ReturnStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; SequenceExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; SpreadElement: ArrayExpression | CallExpression | NewExpression | ObjectExpression | OptionalCallExpression | RecordExpression | TupleExpression; SpreadProperty: null; StaticBlock: ClassBody; StringLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareModule | Decorator | DoWhileStatement | EnumStringMember | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportAttribute | ImportDeclaration | ImportExpression | ImportSpecifier | JSXAttribute | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | ObjectTypeProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExternalModuleReference | TSImportType | TSInstantiationExpression | T
SLiteralType | TSMethodSignature | TSModuleDeclaration | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; StringLiteralTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; StringTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; Super: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; SwitchCase: SwitchStatement; SwitchStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; SymbolTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; TSAnyKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSArrayType: TSArrayType | TSAsExpression | TSConditionalType
| TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSAsExpression: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TSBigIntKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSBooleanKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSCallSignatureDeclaration: TSInterfaceBody | TSTypeLiteral; TSConditionalType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSConstructSignatureDeclaration: TSInterfaceBody | TSTypeLiteral; TSConstructorType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSDeclareFunction: BlockStatement | DoWhileStatement | ExportDefaultDeclaration | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSDeclareMethod: ClassBody; TSEnumDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSEnumMember: TSEnumDeclaration; TSExportAssignment: Blo
ckStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSExpressionWithTypeArguments: ClassDeclaration | ClassExpression | TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSInterfaceDeclaration | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSExternalModuleReference: TSImportEqualsDeclaration; TSFunctionType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSImportEqualsDeclaration: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSImportType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSTypeQuery | TSUnionType | TemplateLiteral; TSIndexSignature: ClassBody | TSInterfaceBody | TSTypeLiteral; TSIndexedAccessType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSInferType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSInstantiationExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TSInterfaceBody: TSInterfaceDeclaration; TSInterfaceDeclarati
on: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSIntersectionType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSIntrinsicKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSLiteralType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSMappedType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSMethodSignature: TSInterfaceBody | TSTypeLiteral; TSModuleBlock: TSModuleDeclaration; TSModuleDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | TSModuleDeclaration | WhileStatement | WithStatement; TSNamedTupleMember: TSTupleType; TSNamespaceExportDeclaration: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSNeverKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSNonNullExpression: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpressio
n | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TSNullKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSNumberKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSObjectKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSOptionalType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSParameterProperty: ArrayPattern | AssignmentExpression | ClassMethod | ClassPrivateMethod | ForInStatement | ForOfStatement | RestElement | TSDeclareMethod | VariableDeclarator; TSParenthesizedType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSPropertySignature: TSInterfaceBody | TSTypeLiteral; TSQualifiedName: TSExpressionWithTypeArguments | TSImportEqualsDeclaration | TSImportType | TSQualifiedName | TSTypeQuery | TSTypeReference; TSRestType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSSatisfiesExpression: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpres
sion | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TSStringKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSSymbolKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSThisType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSTypePredicate | TSUnionType | TemplateLiteral; TSTupleType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeAliasDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TSTypeAnnotation: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | RestElement | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSFunctionType | TSIndexSignature | TSMethodSignature | TSPropertySignature | TSTypePredicate; TSTypeAssertion: ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | RestElement | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TSTypeLiteral: TSArrayType | TSAsExpression | TS
ConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeOperator: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeParameter: TSInferType | TSMappedType | TSTypeParameterDeclaration; TSTypeParameterDeclaration: ArrowFunctionExpression | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | FunctionDeclaration | FunctionExpression | ObjectMethod | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSFunctionType | TSInterfaceDeclaration | TSMethodSignature | TSTypeAliasDeclaration; TSTypeParameterInstantiation: CallExpression | ClassDeclaration | ClassExpression | JSXOpeningElement | NewExpression | OptionalCallExpression | TSExpressionWithTypeArguments | TSImportType | TSInstantiationExpression | TSTypeQuery | TSTypeReference | TaggedTemplateExpression; TSTypePredicate: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeQuery: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSTypeReference: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSUndefinedKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSUnionType: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSUnknownKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersectionType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TSVoidKeyword: TSArrayType | TSAsExpression | TSConditionalType | TSIndexedAccessType | TSIntersecti
onType | TSMappedType | TSNamedTupleMember | TSOptionalType | TSParenthesizedType | TSRestType | TSSatisfiesExpression | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeOperator | TSTypeParameter | TSTypeParameterInstantiation | TSUnionType | TemplateLiteral; TaggedTemplateExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TemplateElement: TemplateLiteral; TemplateLiteral: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSLiteralType | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ThisExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression
| TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; ThisTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; ThrowStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TopicReference: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TryStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TupleExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TupleTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallPrope
rty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; TypeAlias: BlockStatement | DeclareExportDeclaration | DeclaredPredicate | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; TypeAnnotation: ArrayPattern | ArrowFunctionExpression | AssignmentPattern | ClassAccessorProperty | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | DeclareExportDeclaration | DeclareModuleExports | DeclaredPredicate | FunctionDeclaration | FunctionExpression | Identifier | ObjectMethod | ObjectPattern | RestElement | TypeCastExpression | TypeParameter; TypeCastExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | DeclareExportDeclaration | DeclaredPredicate | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; TypeParameter: DeclareExportDeclaration | DeclaredPredicate | TypeParameterDeclaration; TypeParameterDeclaration: ArrowFunctionExpression | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateMethod | DeclareClass | DeclareExportDeclaration | DeclareInterface | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionDeclaration | FunctionExpression | FunctionTypeAnnotation | InterfaceDeclaration | ObjectMethod | OpaqueType | TypeAlias; TypeParameterInstantiation: CallExpression | ClassDeclaration | ClassExpression | ClassImplements | DeclareExportDeclaration | DeclaredPredicate | GenericTypeAnnotation | InterfaceExtends | JSXOpeningElement | NewExpression | OptionalCallExpression | TaggedTemplateExpression; TypeofTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; UnaryExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | F
orOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSLiteralType | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; UnionTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; UpdateExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; V8IntrinsicIdentifier: CallExpression | NewExpression; VariableDeclaration: BlockStatement | DoWhileStatement | ExportNamedDeclaration | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; VariableDeclarator: VariableDeclaration; Variance: ClassAccessorProperty | ClassPrivateProperty | ClassProperty | DeclareExportDeclaration | DeclaredPredicate | ObjectTypeIndexer | ObjectTypeProperty | TypeParameter; VoidTypeAnnotation: ArrayTypeAnnotation | DeclareExportDeclaration | DeclareOpaqueType | DeclareTypeAlias | DeclaredPredicate | FunctionTypeAnnotation | FunctionTypeParam | IndexedAccessType | IntersectionTypeAnnotation | NullableTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalIndexedAccessType | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeParameter | TypeParameterInstantiation | TypeofTypeAnnotation | UnionTypeAnnotation; WhileStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement |
WithStatement; WithStatement: BlockStatement | DoWhileStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | Program | StaticBlock | SwitchCase | TSModuleBlock | WhileStatement | WithStatement; YieldExpression: ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BinaryExpression | BindExpression | CallExpression | ClassAccessorProperty | ClassDeclaration | ClassExpression | ClassMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | Decorator | DoWhileStatement | ExportDefaultDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | ImportExpression | JSXExpressionContainer | JSXSpreadAttribute | JSXSpreadChild | LogicalExpression | MemberExpression | NewExpression | ObjectMethod | ObjectProperty | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelineTopicExpression | ReturnStatement | SequenceExpression | SpreadElement | SwitchCase | SwitchStatement | TSAsExpression | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSInstantiationExpression | TSMethodSignature | TSNonNullExpression | TSPropertySignature | TSSatisfiesExpression | TSTypeAssertion | TaggedTemplateExpression | TemplateLiteral | ThrowStatement | TupleExpression | TypeCastExpression | UnaryExpression | UpdateExpression | VariableDeclarator | WhileStatement | WithStatement | YieldExpression; } declare function deprecationWarning(oldName: string, newName: string, prefix?: string): void; declare const react: { isReactComponent: (member: Node) => boolean; isCompatTag: typeof isCompatTag; buildChildren: typeof buildChildren; }; export { ACCESSOR_TYPES, ALIAS_KEYS, ASSIGNMENT_OPERATORS, Accessor, Aliases, AnyTypeAnnotation, ArgumentPlaceholder, ArrayExpression, ArrayPattern, ArrayTypeAnnotation, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AwaitExpression, BINARY_OPERATORS, BINARY_TYPES, BLOCKPARENT_TYPES, BLOCK_SCOPED_SYMBOL, BLOCK_TYPES, BOOLEAN_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS, BOOLEAN_UNARY_OPERATORS, BUILDER_KEYS, BigIntLiteral, Binary, BinaryExpression, BindExpression, Block, BlockParent, BlockStatement, BooleanLiteral, BooleanLiteralTypeAnnotation, BooleanTypeAnnotation, BreakStatement, CLASS_TYPES, COMMENT_KEYS, COMPARISON_BINARY_OPERATORS, COMPLETIONSTATEMENT_TYPES, CONDITIONAL_TYPES, CallExpression, CatchClause, Class, ClassAccessorProperty, ClassBody, ClassDeclaration, ClassExpression, ClassImplements, ClassMethod, ClassPrivateMethod, ClassPrivateProperty, ClassProperty, Comment, CommentBlock, CommentLine, CommentTypeShorthand, CompletionStatement, Conditional, ConditionalExpression, ContinueStatement, DECLARATION_TYPES, DEPRECATED_ALIASES, DEPRECATED_KEYS, DebuggerStatement, DecimalLiteral, Declaration, DeclareClass, DeclareExportAllDeclaration, DeclareExportDeclaration, DeclareFunction, DeclareInterface, DeclareModule, DeclareModuleExports, DeclareOpaqueType, DeclareTypeAlias, DeclareVariable, DeclaredPredicate, Decorator, DeprecatedAliases, Directive, DirectiveLiteral, DoExpression, DoWhileStatement, ENUMBODY_TYPES, ENUMMEMBER_TYPES, EQUALITY_BINARY_OPERATORS, EXPORTDECLARATION_TYPES, EXPRESSIONWRAPPER_TYPES, EXPRESSION_TYPES, EmptyStatement, EmptyTypeAnnotation, EnumBody, EnumBooleanBody, EnumBooleanMember, EnumDeclaration, EnumDefaultedMember, EnumMember, EnumNumberBody, EnumNumberMember, EnumStringBody, EnumStringMember, EnumSymbolBody, ExistsTypeAnnotation, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, Expression, ExpressionStatement, ExpressionWrapper, FLATTENABLE_KEYS, FLIPPED_ALIAS_KEYS, FLOWBASEANNOTATION_TYPES, FLOWDECLARATION_TYPES, FLOWPREDICATE_TYPES, FLOWTYPE_TYPES, FLOW_TYPES, FORXSTATEMENT_TYPES, FOR_INIT_KEYS, FOR_TYPES, FUNCTIONPARENT_TYPES, F
UNCTION_TYPES, FieldOptions, File, Flow, FlowBaseAnnotation, FlowDeclaration, FlowPredicate, FlowType, For, ForInStatement, ForOfStatement, ForStatement, ForXStatement, Function, FunctionDeclaration, FunctionExpression, FunctionParent, FunctionTypeAnnotation, FunctionTypeParam, GenericTypeAnnotation, IMMUTABLE_TYPES, IMPORTOREXPORTDECLARATION_TYPES, INHERIT_KEYS, Identifier, IfStatement, Immutable, Import, ImportAttribute, ImportDeclaration, ImportDefaultSpecifier, ImportExpression, ImportNamespaceSpecifier, ImportOrExportDeclaration, ImportSpecifier, IndexedAccessType, InferredPredicate, InterfaceDeclaration, InterfaceExtends, InterfaceTypeAnnotation, InterpreterDirective, IntersectionTypeAnnotation, JSX, JSXAttribute, JSXClosingElement, JSXClosingFragment, JSXElement, JSXEmptyExpression, JSXExpressionContainer, JSXFragment, JSXIdentifier, JSXMemberExpression, JSXNamespacedName, JSXOpeningElement, JSXOpeningFragment, JSXSpreadAttribute, JSXSpreadChild, JSXText, JSX_TYPES, LITERAL_TYPES, LOGICAL_OPERATORS, LOOP_TYPES, LVAL_TYPES, LVal, LabeledStatement, Literal, LogicalExpression, Loop, METHOD_TYPES, MISCELLANEOUS_TYPES, MODULEDECLARATION_TYPES, MODULESPECIFIER_TYPES, MemberExpression, MetaProperty, Method, Miscellaneous, MixedTypeAnnotation, ModuleDeclaration, ModuleExpression, ModuleSpecifier, NODE_FIELDS, NODE_PARENT_VALIDATIONS, NOT_LOCAL_BINDING, NUMBER_BINARY_OPERATORS, NUMBER_UNARY_OPERATORS, NewExpression, Node, Noop, NullLiteral, NullLiteralTypeAnnotation, NullableTypeAnnotation, NumberLiteral, NumberLiteralTypeAnnotation, NumberTypeAnnotation, NumericLiteral, OBJECTMEMBER_TYPES, ObjectExpression, ObjectMember, ObjectMethod, ObjectPattern, ObjectProperty, ObjectTypeAnnotation, ObjectTypeCallProperty, ObjectTypeIndexer, ObjectTypeInternalSlot, ObjectTypeProperty, ObjectTypeSpreadProperty, OpaqueType, OptionalCallExpression, OptionalIndexedAccessType, OptionalMemberExpression, PATTERNLIKE_TYPES, PATTERN_TYPES, PLACEHOLDERS, PLACEHOLDERS_ALIAS, PLACEHOLDERS_FLIPPED_ALIAS, PRIVATE_TYPES, PROPERTY_TYPES, PUREISH_TYPES, ParentMaps, ParenthesizedExpression, Pattern, PatternLike, PipelineBareFunction, PipelinePrimaryTopicReference, PipelineTopicExpression, Placeholder, Private, PrivateName, Program, Property, Pureish, QualifiedTypeIdentifier, RecordExpression, RegExpLiteral, RegexLiteral, Options as RemovePropertiesOptions, RestElement, RestProperty, ReturnStatement, SCOPABLE_TYPES, STANDARDIZED_TYPES, STATEMENT_OR_BLOCK_KEYS, STATEMENT_TYPES, STRING_UNARY_OPERATORS, Scopable, SequenceExpression, SourceLocation, SpreadElement, SpreadProperty, Standardized, Statement, StaticBlock, StringLiteral, StringLiteralTypeAnnotation, StringTypeAnnotation, Super, SwitchCase, SwitchStatement, SymbolTypeAnnotation, TERMINATORLESS_TYPES, TSAnyKeyword, TSArrayType, TSAsExpression, TSBASETYPE_TYPES, TSBaseType, TSBigIntKeyword, TSBooleanKeyword, TSCallSignatureDeclaration, TSConditionalType, TSConstructSignatureDeclaration, TSConstructorType, TSDeclareFunction, TSDeclareMethod, TSENTITYNAME_TYPES, TSEntityName, TSEnumDeclaration, TSEnumMember, TSExportAssignment, TSExpressionWithTypeArguments, TSExternalModuleReference, TSFunctionType, TSImportEqualsDeclaration, TSImportType, TSIndexSignature, TSIndexedAccessType, TSInferType, TSInstantiationExpression, TSInterfaceBody, TSInterfaceDeclaration, TSIntersectionType, TSIntrinsicKeyword, TSLiteralType, TSMappedType, TSMethodSignature, TSModuleBlock, TSModuleDeclaration, TSNamedTupleMember, TSNamespaceExportDeclaration, TSNeverKeyword, TSNonNullExpression, TSNullKeyword, TSNumberKeyword, TSObjectKeyword, TSOptionalType, TSParameterProperty, TSParenthesizedType, TSPropertySignature, TSQualifiedName, TSRestType, TSSatisfiesExpression, TSStringKeyword, TSSymbolKeyword, TSTYPEELEMENT_TYPES, TSTYPE_TYPES, TSThisType, TSTupleType, TSType, TSTypeAliasDeclaration, TSTypeAnnotation, TSTypeAssertion, TSTypeElement, TSTypeLiteral, TSTypeOperator, TSTypeParameter, TSTypeParameterDeclaration, TSTypeParameterIns
tantiation, TSTypePredicate, TSTypeQuery, TSTypeReference, TSUndefinedKeyword, TSUnionType, TSUnknownKeyword, TSVoidKeyword, TYPES, TYPESCRIPT_TYPES, TaggedTemplateExpression, TemplateElement, TemplateLiteral, Terminatorless, ThisExpression, ThisTypeAnnotation, ThrowStatement, TopicReference, TraversalAncestors, TraversalHandler, TraversalHandlers, TryStatement, TupleExpression, TupleTypeAnnotation, TypeAlias, TypeAnnotation, TypeCastExpression, TypeParameter, TypeParameterDeclaration, TypeParameterInstantiation, TypeScript, TypeofTypeAnnotation, UNARYLIKE_TYPES, UNARY_OPERATORS, UPDATE_OPERATORS, USERWHITESPACABLE_TYPES, UnaryExpression, UnaryLike, UnionTypeAnnotation, UpdateExpression, UserWhitespacable, V8IntrinsicIdentifier, VISITOR_KEYS, VariableDeclaration, VariableDeclarator, Variance, VoidTypeAnnotation, WHILE_TYPES, While, WhileStatement, WithStatement, YieldExpression, deprecationWarning as __internal__deprecationWarning, addComment, addComments, anyTypeAnnotation, appendToMemberExpression, argumentPlaceholder, arrayExpression, arrayPattern, arrayTypeAnnotation, arrowFunctionExpression, assertAccessor, assertAnyTypeAnnotation, assertArgumentPlaceholder, assertArrayExpression, assertArrayPattern, assertArrayTypeAnnotation, assertArrowFunctionExpression, assertAssignmentExpression, assertAssignmentPattern, assertAwaitExpression, assertBigIntLiteral, assertBinary, assertBinaryExpression, assertBindExpression, assertBlock, assertBlockParent, assertBlockStatement, assertBooleanLiteral, assertBooleanLiteralTypeAnnotation, assertBooleanTypeAnnotation, assertBreakStatement, assertCallExpression, assertCatchClause, assertClass, assertClassAccessorProperty, assertClassBody, assertClassDeclaration, assertClassExpression, assertClassImplements, assertClassMethod, assertClassPrivateMethod, assertClassPrivateProperty, assertClassProperty, assertCompletionStatement, assertConditional, assertConditionalExpression, assertContinueStatement, assertDebuggerStatement, assertDecimalLiteral, assertDeclaration, assertDeclareClass, assertDeclareExportAllDeclaration, assertDeclareExportDeclaration, assertDeclareFunction, assertDeclareInterface, assertDeclareModule, assertDeclareModuleExports, assertDeclareOpaqueType, assertDeclareTypeAlias, assertDeclareVariable, assertDeclaredPredicate, assertDecorator, assertDirective, assertDirectiveLiteral, assertDoExpression, assertDoWhileStatement, assertEmptyStatement, assertEmptyTypeAnnotation, assertEnumBody, assertEnumBooleanBody, assertEnumBooleanMember, assertEnumDeclaration, assertEnumDefaultedMember, assertEnumMember, assertEnumNumberBody, assertEnumNumberMember, assertEnumStringBody, assertEnumStringMember, assertEnumSymbolBody, assertExistsTypeAnnotation, assertExportAllDeclaration, assertExportDeclaration, assertExportDefaultDeclaration, assertExportDefaultSpecifier, assertExportNamedDeclaration, assertExportNamespaceSpecifier, assertExportSpecifier, assertExpression, assertExpressionStatement, assertExpressionWrapper, assertFile, assertFlow, assertFlowBaseAnnotation, assertFlowDeclaration, assertFlowPredicate, assertFlowType, assertFor, assertForInStatement, assertForOfStatement, assertForStatement, assertForXStatement, assertFunction, assertFunctionDeclaration, assertFunctionExpression, assertFunctionParent, assertFunctionTypeAnnotation, assertFunctionTypeParam, assertGenericTypeAnnotation, assertIdentifier, assertIfStatement, assertImmutable, assertImport, assertImportAttribute, assertImportDeclaration, assertImportDefaultSpecifier, assertImportExpression, assertImportNamespaceSpecifier, assertImportOrExportDeclaration, assertImportSpecifier, assertIndexedAccessType, assertInferredPredicate, assertInterfaceDeclaration, assertInterfaceExtends, assertInterfaceTypeAnnotation, assertInterpreterDirective, assertIntersectionTypeAnnotation, assertJSX, assertJSXAttribute, assertJSXClosingElement, assertJSXClosingFragment, assertJSXElement, assertJSXEmptyExpression, assertJSXExpressionContainer, as
sertJSXFragment, assertJSXIdentifier, assertJSXMemberExpression, assertJSXNamespacedName, assertJSXOpeningElement, assertJSXOpeningFragment, assertJSXSpreadAttribute, assertJSXSpreadChild, assertJSXText, assertLVal, assertLabeledStatement, assertLiteral, assertLogicalExpression, assertLoop, assertMemberExpression, assertMetaProperty, assertMethod, assertMiscellaneous, assertMixedTypeAnnotation, assertModuleDeclaration, assertModuleExpression, assertModuleSpecifier, assertNewExpression, assertNode, assertNoop, assertNullLiteral, assertNullLiteralTypeAnnotation, assertNullableTypeAnnotation, assertNumberLiteral, assertNumberLiteralTypeAnnotation, assertNumberTypeAnnotation, assertNumericLiteral, assertObjectExpression, assertObjectMember, assertObjectMethod, assertObjectPattern, assertObjectProperty, assertObjectTypeAnnotation, assertObjectTypeCallProperty, assertObjectTypeIndexer, assertObjectTypeInternalSlot, assertObjectTypeProperty, assertObjectTypeSpreadProperty, assertOpaqueType, assertOptionalCallExpression, assertOptionalIndexedAccessType, assertOptionalMemberExpression, assertParenthesizedExpression, assertPattern, assertPatternLike, assertPipelineBareFunction, assertPipelinePrimaryTopicReference, assertPipelineTopicExpression, assertPlaceholder, assertPrivate, assertPrivateName, assertProgram, assertProperty, assertPureish, assertQualifiedTypeIdentifier, assertRecordExpression, assertRegExpLiteral, assertRegexLiteral, assertRestElement, assertRestProperty, assertReturnStatement, assertScopable, assertSequenceExpression, assertSpreadElement, assertSpreadProperty, assertStandardized, assertStatement, assertStaticBlock, assertStringLiteral, assertStringLiteralTypeAnnotation, assertStringTypeAnnotation, assertSuper, assertSwitchCase, assertSwitchStatement, assertSymbolTypeAnnotation, assertTSAnyKeyword, assertTSArrayType, assertTSAsExpression, assertTSBaseType, assertTSBigIntKeyword, assertTSBooleanKeyword, assertTSCallSignatureDeclaration, assertTSConditionalType, assertTSConstructSignatureDeclaration, assertTSConstructorType, assertTSDeclareFunction, assertTSDeclareMethod, assertTSEntityName, assertTSEnumDeclaration, assertTSEnumMember, assertTSExportAssignment, assertTSExpressionWithTypeArguments, assertTSExternalModuleReference, assertTSFunctionType, assertTSImportEqualsDeclaration, assertTSImportType, assertTSIndexSignature, assertTSIndexedAccessType, assertTSInferType, assertTSInstantiationExpression, assertTSInterfaceBody, assertTSInterfaceDeclaration, assertTSIntersectionType, assertTSIntrinsicKeyword, assertTSLiteralType, assertTSMappedType, assertTSMethodSignature, assertTSModuleBlock, assertTSModuleDeclaration, assertTSNamedTupleMember, assertTSNamespaceExportDeclaration, assertTSNeverKeyword, assertTSNonNullExpression, assertTSNullKeyword, assertTSNumberKeyword, assertTSObjectKeyword, assertTSOptionalType, assertTSParameterProperty, assertTSParenthesizedType, assertTSPropertySignature, assertTSQualifiedName, assertTSRestType, assertTSSatisfiesExpression, assertTSStringKeyword, assertTSSymbolKeyword, assertTSThisType, assertTSTupleType, assertTSType, assertTSTypeAliasDeclaration, assertTSTypeAnnotation, assertTSTypeAssertion, assertTSTypeElement, assertTSTypeLiteral, assertTSTypeOperator, assertTSTypeParameter, assertTSTypeParameterDeclaration, assertTSTypeParameterInstantiation, assertTSTypePredicate, assertTSTypeQuery, assertTSTypeReference, assertTSUndefinedKeyword, assertTSUnionType, assertTSUnknownKeyword, assertTSVoidKeyword, assertTaggedTemplateExpression, assertTemplateElement, assertTemplateLiteral, assertTerminatorless, assertThisExpression, assertThisTypeAnnotation, assertThrowStatement, assertTopicReference, assertTryStatement, assertTupleExpression, assertTupleTypeAnnotation, assertTypeAlias, assertTypeAnnotation, assertTypeCastExpression, assertTypeParameter, assertTypeParameterDeclaration, assertTypeParameterInstantiation, assertTypeScript, assertTypeofTypeAnnotation, assertUnaryExpression, assert
UnaryLike, assertUnionTypeAnnotation, assertUpdateExpression, assertUserWhitespacable, assertV8IntrinsicIdentifier, assertVariableDeclaration, assertVariableDeclarator, assertVariance, assertVoidTypeAnnotation, assertWhile, assertWhileStatement, assertWithStatement, assertYieldExpression, assignmentExpression, assignmentPattern, awaitExpression, bigIntLiteral, binaryExpression, bindExpression, blockStatement, booleanLiteral, booleanLiteralTypeAnnotation, booleanTypeAnnotation, breakStatement, buildMatchMemberExpression, buildUndefinedNode, callExpression, catchClause, classAccessorProperty, classBody, classDeclaration, classExpression, classImplements, classMethod, classPrivateMethod, classPrivateProperty, classProperty, clone, cloneDeep, cloneDeepWithoutLoc, cloneNode, cloneWithoutLoc, conditionalExpression, continueStatement, createFlowUnionType, createTSUnionType, _default$4 as createTypeAnnotationBasedOnTypeof, createFlowUnionType as createUnionTypeAnnotation, debuggerStatement, decimalLiteral, declareClass, declareExportAllDeclaration, declareExportDeclaration, declareFunction, declareInterface, declareModule, declareModuleExports, declareOpaqueType, declareTypeAlias, declareVariable, declaredPredicate, decorator, directive, directiveLiteral, doExpression, doWhileStatement, emptyStatement, emptyTypeAnnotation, ensureBlock, enumBooleanBody, enumBooleanMember, enumDeclaration, enumDefaultedMember, enumNumberBody, enumNumberMember, enumStringBody, enumStringMember, enumSymbolBody, existsTypeAnnotation, exportAllDeclaration, exportDefaultDeclaration, exportDefaultSpecifier, exportNamedDeclaration, exportNamespaceSpecifier, exportSpecifier, expressionStatement, file, forInStatement, forOfStatement, forStatement, functionDeclaration, functionExpression, functionTypeAnnotation, functionTypeParam, genericTypeAnnotation, getBindingIdentifiers, _default as getOuterBindingIdentifiers, identifier, ifStatement, _import as import, importAttribute, importDeclaration, importDefaultSpecifier, importExpression, importNamespaceSpecifier, importSpecifier, indexedAccessType, inferredPredicate, inheritInnerComments, inheritLeadingComments, inheritTrailingComments, inherits, inheritsComments, interfaceDeclaration, interfaceExtends, interfaceTypeAnnotation, interpreterDirective, intersectionTypeAnnotation, is, isAccessor, isAnyTypeAnnotation, isArgumentPlaceholder, isArrayExpression, isArrayPattern, isArrayTypeAnnotation, isArrowFunctionExpression, isAssignmentExpression, isAssignmentPattern, isAwaitExpression, isBigIntLiteral, isBinary, isBinaryExpression, isBindExpression, isBinding, isBlock, isBlockParent, isBlockScoped, isBlockStatement, isBooleanLiteral, isBooleanLiteralTypeAnnotation, isBooleanTypeAnnotation, isBreakStatement, isCallExpression, isCatchClause, isClass, isClassAccessorProperty, isClassBody, isClassDeclaration, isClassExpression, isClassImplements, isClassMethod, isClassPrivateMethod, isClassPrivateProperty, isClassProperty, isCompletionStatement, isConditional, isConditionalExpression, isContinueStatement, isDebuggerStatement, isDecimalLiteral, isDeclaration, isDeclareClass, isDeclareExportAllDeclaration, isDeclareExportDeclaration, isDeclareFunction, isDeclareInterface, isDeclareModule, isDeclareModuleExports, isDeclareOpaqueType, isDeclareTypeAlias, isDeclareVariable, isDeclaredPredicate, isDecorator, isDirective, isDirectiveLiteral, isDoExpression, isDoWhileStatement, isEmptyStatement, isEmptyTypeAnnotation, isEnumBody, isEnumBooleanBody, isEnumBooleanMember, isEnumDeclaration, isEnumDefaultedMember, isEnumMember, isEnumNumberBody, isEnumNumberMember, isEnumStringBody, isEnumStringMember, isEnumSymbolBody, isExistsTypeAnnotation, isExportAllDeclaration, isExportDeclaration, isExportDefaultDeclaration, isExportDefaultSpecifier, isExportNamedDeclaration, isExportNamespaceSpecifier, isExportSpecifier, isExpression, isExpressionStatement, isExpressionWrapper, isFile, isFlow, isFlowBaseAnnotation, isFlowDeclaration, isFlowPred
icate, isFlowType, isFor, isForInStatement, isForOfStatement, isForStatement, isForXStatement, isFunction, isFunctionDeclaration, isFunctionExpression, isFunctionParent, isFunctionTypeAnnotation, isFunctionTypeParam, isGenericTypeAnnotation, isIdentifier, isIfStatement, isImmutable, isImport, isImportAttribute, isImportDeclaration, isImportDefaultSpecifier, isImportExpression, isImportNamespaceSpecifier, isImportOrExportDeclaration, isImportSpecifier, isIndexedAccessType, isInferredPredicate, isInterfaceDeclaration, isInterfaceExtends, isInterfaceTypeAnnotation, isInterpreterDirective, isIntersectionTypeAnnotation, isJSX, isJSXAttribute, isJSXClosingElement, isJSXClosingFragment, isJSXElement, isJSXEmptyExpression, isJSXExpressionContainer, isJSXFragment, isJSXIdentifier, isJSXMemberExpression, isJSXNamespacedName, isJSXOpeningElement, isJSXOpeningFragment, isJSXSpreadAttribute, isJSXSpreadChild, isJSXText, isLVal, isLabeledStatement, isLet, isLiteral, isLogicalExpression, isLoop, isMemberExpression, isMetaProperty, isMethod, isMiscellaneous, isMixedTypeAnnotation, isModuleDeclaration, isModuleExpression, isModuleSpecifier, isNewExpression, isNode, isNodesEquivalent, isNoop, isNullLiteral, isNullLiteralTypeAnnotation, isNullableTypeAnnotation, isNumberLiteral, isNumberLiteralTypeAnnotation, isNumberTypeAnnotation, isNumericLiteral, isObjectExpression, isObjectMember, isObjectMethod, isObjectPattern, isObjectProperty, isObjectTypeAnnotation, isObjectTypeCallProperty, isObjectTypeIndexer, isObjectTypeInternalSlot, isObjectTypeProperty, isObjectTypeSpreadProperty, isOpaqueType, isOptionalCallExpression, isOptionalIndexedAccessType, isOptionalMemberExpression, isParenthesizedExpression, isPattern, isPatternLike, isPipelineBareFunction, isPipelinePrimaryTopicReference, isPipelineTopicExpression, isPlaceholder, isPlaceholderType, isPrivate, isPrivateName, isProgram, isProperty, isPureish, isQualifiedTypeIdentifier, isRecordExpression, isReferenced, isRegExpLiteral, isRegexLiteral, isRestElement, isRestProperty, isReturnStatement, isScopable, isScope, isSequenceExpression, isSpecifierDefault, isSpreadElement, isSpreadProperty, isStandardized, isStatement, isStaticBlock, isStringLiteral, isStringLiteralTypeAnnotation, isStringTypeAnnotation, isSuper, isSwitchCase, isSwitchStatement, isSymbolTypeAnnotation, isTSAnyKeyword, isTSArrayType, isTSAsExpression, isTSBaseType, isTSBigIntKeyword, isTSBooleanKeyword, isTSCallSignatureDeclaration, isTSConditionalType, isTSConstructSignatureDeclaration, isTSConstructorType, isTSDeclareFunction, isTSDeclareMethod, isTSEntityName, isTSEnumDeclaration, isTSEnumMember, isTSExportAssignment, isTSExpressionWithTypeArguments, isTSExternalModuleReference, isTSFunctionType, isTSImportEqualsDeclaration, isTSImportType, isTSIndexSignature, isTSIndexedAccessType, isTSInferType, isTSInstantiationExpression, isTSInterfaceBody, isTSInterfaceDeclaration, isTSIntersectionType, isTSIntrinsicKeyword, isTSLiteralType, isTSMappedType, isTSMethodSignature, isTSModuleBlock, isTSModuleDeclaration, isTSNamedTupleMember, isTSNamespaceExportDeclaration, isTSNeverKeyword, isTSNonNullExpression, isTSNullKeyword, isTSNumberKeyword, isTSObjectKeyword, isTSOptionalType, isTSParameterProperty, isTSParenthesizedType, isTSPropertySignature, isTSQualifiedName, isTSRestType, isTSSatisfiesExpression, isTSStringKeyword, isTSSymbolKeyword, isTSThisType, isTSTupleType, isTSType, isTSTypeAliasDeclaration, isTSTypeAnnotation, isTSTypeAssertion, isTSTypeElement, isTSTypeLiteral, isTSTypeOperator, isTSTypeParameter, isTSTypeParameterDeclaration, isTSTypeParameterInstantiation, isTSTypePredicate, isTSTypeQuery, isTSTypeReference, isTSUndefinedKeyword, isTSUnionType, isTSUnknownKeyword, isTSVoidKeyword, isTaggedTemplateExpression, isTemplateElement, isTemplateLiteral, isTerminatorless, isThisExpression, isThisTypeAnnotation, isThrowStatement, isTopicReference, isTryStatement, isTupleExpression, isTupleTypeAnnotation, isType, isTypeAlias, isTyp
eAnnotation, isTypeCastExpression, isTypeParameter, isTypeParameterDeclaration, isTypeParameterInstantiation, isTypeScript, isTypeofTypeAnnotation, isUnaryExpression, isUnaryLike, isUnionTypeAnnotation, isUpdateExpression, isUserWhitespacable, isV8IntrinsicIdentifier, isValidES3Identifier, isValidIdentifier, isVar, isVariableDeclaration, isVariableDeclarator, isVariance, isVoidTypeAnnotation, isWhile, isWhileStatement, isWithStatement, isYieldExpression, jsxAttribute as jSXAttribute, jsxClosingElement as jSXClosingElement, jsxClosingFragment as jSXClosingFragment, jsxElement as jSXElement, jsxEmptyExpression as jSXEmptyExpression, jsxExpressionContainer as jSXExpressionContainer, jsxFragment as jSXFragment, jsxIdentifier as jSXIdentifier, jsxMemberExpression as jSXMemberExpression, jsxNamespacedName as jSXNamespacedName, jsxOpeningElement as jSXOpeningElement, jsxOpeningFragment as jSXOpeningFragment, jsxSpreadAttribute as jSXSpreadAttribute, jsxSpreadChild as jSXSpreadChild, jsxText as jSXText, jsxAttribute, jsxClosingElement, jsxClosingFragment, jsxElement, jsxEmptyExpression, jsxExpressionContainer, jsxFragment, jsxIdentifier, jsxMemberExpression, jsxNamespacedName, jsxOpeningElement, jsxOpeningFragment, jsxSpreadAttribute, jsxSpreadChild, jsxText, labeledStatement, logicalExpression, matchesPattern, memberExpression, metaProperty, mixedTypeAnnotation, moduleExpression, newExpression, noop, nullLiteral, nullLiteralTypeAnnotation, nullableTypeAnnotation, NumberLiteral$1 as numberLiteral, numberLiteralTypeAnnotation, numberTypeAnnotation, numericLiteral, objectExpression, objectMethod, objectPattern, objectProperty, objectTypeAnnotation, objectTypeCallProperty, objectTypeIndexer, objectTypeInternalSlot, objectTypeProperty, objectTypeSpreadProperty, opaqueType, optionalCallExpression, optionalIndexedAccessType, optionalMemberExpression, parenthesizedExpression, pipelineBareFunction, pipelinePrimaryTopicReference, pipelineTopicExpression, placeholder, prependToMemberExpression, privateName, program, qualifiedTypeIdentifier, react, recordExpression, regExpLiteral, RegexLiteral$1 as regexLiteral, removeComments, removeProperties, removePropertiesDeep, removeTypeDuplicates, restElement, RestProperty$1 as restProperty, returnStatement, sequenceExpression, shallowEqual, spreadElement, SpreadProperty$1 as spreadProperty, staticBlock, stringLiteral, stringLiteralTypeAnnotation, stringTypeAnnotation, _super as super, switchCase, switchStatement, symbolTypeAnnotation, tsAnyKeyword as tSAnyKeyword, tsArrayType as tSArrayType, tsAsExpression as tSAsExpression, tsBigIntKeyword as tSBigIntKeyword, tsBooleanKeyword as tSBooleanKeyword, tsCallSignatureDeclaration as tSCallSignatureDeclaration, tsConditionalType as tSConditionalType, tsConstructSignatureDeclaration as tSConstructSignatureDeclaration, tsConstructorType as tSConstructorType, tsDeclareFunction as tSDeclareFunction, tsDeclareMethod as tSDeclareMethod, tsEnumDeclaration as tSEnumDeclaration, tsEnumMember as tSEnumMember, tsExportAssignment as tSExportAssignment, tsExpressionWithTypeArguments as tSExpressionWithTypeArguments, tsExternalModuleReference as tSExternalModuleReference, tsFunctionType as tSFunctionType, tsImportEqualsDeclaration as tSImportEqualsDeclaration, tsImportType as tSImportType, tsIndexSignature as tSIndexSignature, tsIndexedAccessType as tSIndexedAccessType, tsInferType as tSInferType, tsInstantiationExpression as tSInstantiationExpression, tsInterfaceBody as tSInterfaceBody, tsInterfaceDeclaration as tSInterfaceDeclaration, tsIntersectionType as tSIntersectionType, tsIntrinsicKeyword as tSIntrinsicKeyword, tsLiteralType as tSLiteralType, tsMappedType as tSMappedType, tsMethodSignature as tSMethodSignature, tsModuleBlock as tSModuleBlock, tsModuleDeclaration as tSModuleDeclaration, tsNamedTupleMember as tSNamedTupleMember, tsNamespaceExportDeclaration as tSNamespaceExportDeclaration, tsNeverKeyword as tSNeverKeyword, tsNonNullExpression as tSNonNullExpression, t
sNullKeyword as tSNullKeyword, tsNumberKeyword as tSNumberKeyword, tsObjectKeyword as tSObjectKeyword, tsOptionalType as tSOptionalType, tsParameterProperty as tSParameterProperty, tsParenthesizedType as tSParenthesizedType, tsPropertySignature as tSPropertySignature, tsQualifiedName as tSQualifiedName, tsRestType as tSRestType, tsSatisfiesExpression as tSSatisfiesExpression, tsStringKeyword as tSStringKeyword, tsSymbolKeyword as tSSymbolKeyword, tsThisType as tSThisType, tsTupleType as tSTupleType, tsTypeAliasDeclaration as tSTypeAliasDeclaration, tsTypeAnnotation as tSTypeAnnotation, tsTypeAssertion as tSTypeAssertion, tsTypeLiteral as tSTypeLiteral, tsTypeOperator as tSTypeOperator, tsTypeParameter as tSTypeParameter, tsTypeParameterDeclaration as tSTypeParameterDeclaration, tsTypeParameterInstantiation as tSTypeParameterInstantiation, tsTypePredicate as tSTypePredicate, tsTypeQuery as tSTypeQuery, tsTypeReference as tSTypeReference, tsUndefinedKeyword as tSUndefinedKeyword, tsUnionType as tSUnionType, tsUnknownKeyword as tSUnknownKeyword, tsVoidKeyword as tSVoidKeyword, taggedTemplateExpression, templateElement, templateLiteral, thisExpression, thisTypeAnnotation, throwStatement, toBindingIdentifierName, toBlock, toComputedKey, _default$3 as toExpression, toIdentifier, toKeyAlias, _default$2 as toStatement, topicReference, traverse, traverseFast, tryStatement, tsAnyKeyword, tsArrayType, tsAsExpression, tsBigIntKeyword, tsBooleanKeyword, tsCallSignatureDeclaration, tsConditionalType, tsConstructSignatureDeclaration, tsConstructorType, tsDeclareFunction, tsDeclareMethod, tsEnumDeclaration, tsEnumMember, tsExportAssignment, tsExpressionWithTypeArguments, tsExternalModuleReference, tsFunctionType, tsImportEqualsDeclaration, tsImportType, tsIndexSignature, tsIndexedAccessType, tsInferType, tsInstantiationExpression, tsInterfaceBody, tsInterfaceDeclaration, tsIntersectionType, tsIntrinsicKeyword, tsLiteralType, tsMappedType, tsMethodSignature, tsModuleBlock, tsModuleDeclaration, tsNamedTupleMember, tsNamespaceExportDeclaration, tsNeverKeyword, tsNonNullExpression, tsNullKeyword, tsNumberKeyword, tsObjectKeyword, tsOptionalType, tsParameterProperty, tsParenthesizedType, tsPropertySignature, tsQualifiedName, tsRestType, tsSatisfiesExpression, tsStringKeyword, tsSymbolKeyword, tsThisType, tsTupleType, tsTypeAliasDeclaration, tsTypeAnnotation, tsTypeAssertion, tsTypeLiteral, tsTypeOperator, tsTypeParameter, tsTypeParameterDeclaration, tsTypeParameterInstantiation, tsTypePredicate, tsTypeQuery, tsTypeReference, tsUndefinedKeyword, tsUnionType, tsUnknownKeyword, tsVoidKeyword, tupleExpression, tupleTypeAnnotation, typeAlias, typeAnnotation, typeCastExpression, typeParameter, typeParameterDeclaration, typeParameterInstantiation, typeofTypeAnnotation, unaryExpression, unionTypeAnnotation, updateExpression, v8IntrinsicIdentifier, validate, _default$1 as valueToNode, variableDeclaration, variableDeclarator, variance, voidTypeAnnotation, whileStatement, withStatement, yieldExpression };
// duplicated from transform-file so we do not have to import anything here type TransformFile = { (filename: string, callback: (error: Error, file: null) => void): void; ( filename: string, opts: any, callback: (error: Error, file: null) => void, ): void; }; export const transformFile: TransformFile = function transformFile( filename, opts, callback?: (error: Error, file: null) => void, ) { if (typeof opts === "function") { callback = opts; } callback(new Error("Transforming files is not supported in browsers"), null); }; export function transformFileSync(): never { throw new Error("Transforming files is not supported in browsers"); } export function transformFileAsync() { return Promise.reject( new Error("Transforming files is not supported in browsers"), ); }
import gensync, { type Handler } from "gensync"; import loadConfig from "./config/index.ts"; import type { InputOptions, ResolvedConfig } from "./config/index.ts"; import { run } from "./transformation/index.ts"; import type { FileResult, FileResultCallback } from "./transformation/index.ts"; import * as fs from "./gensync-utils/fs.ts"; type transformFileBrowserType = typeof import("./transform-file-browser"); type transformFileType = typeof import("./transform-file"); // Kind of gross, but essentially asserting that the exports of this module are the same as the // exports of transform-file-browser, since this file may be replaced at bundle time with // transform-file-browser. ({}) as any as transformFileBrowserType as transformFileType; const transformFileRunner = gensync(function* ( filename: string, opts?: InputOptions, ): Handler<FileResult | null> { const options = { ...opts, filename }; const config: ResolvedConfig | null = yield* loadConfig(options); if (config === null) return null; const code = yield* fs.readFile(filename, "utf8"); return yield* run(config, code); }); // @ts-expect-error TS doesn't detect that this signature is compatible export function transformFile( filename: string, callback: FileResultCallback, ): void; export function transformFile( filename: string, opts: InputOptions | undefined | null, callback: FileResultCallback, ): void; export function transformFile( ...args: Parameters<typeof transformFileRunner.errback> ) { transformFileRunner.errback(...args); } export function transformFileSync( ...args: Parameters<typeof transformFileRunner.sync> ) { return transformFileRunner.sync(...args); } export function transformFileAsync( ...args: Parameters<typeof transformFileRunner.async> ) { return transformFileRunner.async(...args); }
type browserType = typeof import("./resolve-targets-browser"); type nodeType = typeof import("./resolve-targets"); // Kind of gross, but essentially asserting that the exports of this module are the same as the // exports of index-browser, since this file may be replaced at bundle time with index-browser. ({}) as any as browserType as nodeType; import type { ValidatedOptions } from "./validation/options.ts"; import path from "path"; import getTargets, { type InputTargets, } from "@babel/helper-compilation-targets"; import type { Targets } from "@babel/helper-compilation-targets"; export function resolveBrowserslistConfigFile( browserslistConfigFile: string, configFileDir: string, ): string | undefined { return path.resolve(configFileDir, browserslistConfigFile); } export function resolveTargets( options: ValidatedOptions, root: string, ): Targets { const optTargets = options.targets; let targets: InputTargets; if (typeof optTargets === "string" || Array.isArray(optTargets)) { targets = { browsers: optTargets }; } else if (optTargets) { if ("esmodules" in optTargets) { targets = { ...optTargets, esmodules: "intersect" }; } else { // https://github.com/microsoft/TypeScript/issues/17002 targets = optTargets as InputTargets; } } const { browserslistConfigFile } = options; let configFile; let ignoreBrowserslistConfig = false; if (typeof browserslistConfigFile === "string") { configFile = browserslistConfigFile; } else { ignoreBrowserslistConfig = browserslistConfigFile === false; } return getTargets(targets, { ignoreBrowserslistConfig, configFile, configPath: root, browserslistEnv: options.browserslistEnv, }); }
import type { ValidatedOptions } from "./validation/options.ts"; import getTargets, { type InputTargets, } from "@babel/helper-compilation-targets"; import type { Targets } from "@babel/helper-compilation-targets"; export function resolveBrowserslistConfigFile( // eslint-disable-next-line @typescript-eslint/no-unused-vars browserslistConfigFile: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars configFilePath: string, ): string | void { return undefined; } export function resolveTargets( options: ValidatedOptions, // eslint-disable-next-line @typescript-eslint/no-unused-vars root: string, ): Targets { const optTargets = options.targets; let targets: InputTargets; if (typeof optTargets === "string" || Array.isArray(optTargets)) { targets = { browsers: optTargets }; } else if (optTargets) { if ("esmodules" in optTargets) { targets = { ...optTargets, esmodules: "intersect" }; } else { // https://github.com/microsoft/TypeScript/issues/17002 targets = optTargets as InputTargets; } } return getTargets(targets, { ignoreBrowserslistConfig: true, browserslistEnv: options.browserslistEnv, }); }
import type { Handler } from "gensync"; import type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData, } from "./types.ts"; import type { CallerMetadata } from "../validation/options.ts"; export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData }; export function findConfigUpwards( // eslint-disable-next-line @typescript-eslint/no-unused-vars rootDir: string, ): string | null { return null; } // eslint-disable-next-line require-yield export function* findPackageData(filepath: string): Handler<FilePackageData> { return { filepath, directories: [], pkg: null, isPackage: false, }; } // eslint-disable-next-line require-yield export function* findRelativeConfig( // eslint-disable-next-line @typescript-eslint/no-unused-vars pkgData: FilePackageData, // eslint-disable-next-line @typescript-eslint/no-unused-vars envName: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars caller: CallerMetadata | undefined, ): Handler<RelativeConfig> { return { config: null, ignore: null }; } // eslint-disable-next-line require-yield export function* findRootConfig( // eslint-disable-next-line @typescript-eslint/no-unused-vars dirname: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars envName: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars caller: CallerMetadata | undefined, ): Handler<ConfigFile | null> { return null; } // eslint-disable-next-line require-yield export function* loadConfig( name: string, dirname: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars envName: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars caller: CallerMetadata | undefined, ): Handler<ConfigFile> { throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`); } // eslint-disable-next-line require-yield export function* resolveShowConfigPath( // eslint-disable-next-line @typescript-eslint/no-unused-vars dirname: string, ): Handler<string | null> { return null; } export const ROOT_CONFIG_FILENAMES: string[] = []; // eslint-disable-next-line @typescript-eslint/no-unused-vars export function resolvePlugin(name: string, dirname: string): string | null { return null; } // eslint-disable-next-line @typescript-eslint/no-unused-vars export function resolvePreset(name: string, dirname: string): string | null { return null; } export function loadPlugin( name: string, dirname: string, ): Handler<{ filepath: string; value: unknown; }> { throw new Error( `Cannot load plugin ${name} relative to ${dirname} in a browser`, ); } export function loadPreset( name: string, dirname: string, ): Handler<{ filepath: string; value: unknown; }> { throw new Error( `Cannot load preset ${name} relative to ${dirname} in a browser`, ); }
type indexBrowserType = typeof import("./index-browser"); type indexType = typeof import("./index"); // Kind of gross, but essentially asserting that the exports of this module are the same as the // exports of index-browser, since this file may be replaced at bundle time with index-browser. ({}) as any as indexBrowserType as indexType; export { findPackageData } from "./package.ts"; export { findConfigUpwards, findRelativeConfig, findRootConfig, loadConfig, resolveShowConfigPath, ROOT_CONFIG_FILENAMES, } from "./configuration.ts"; export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData, } from "./types.ts"; export { loadPlugin, loadPreset, resolvePlugin, resolvePreset, } from "./plugins.ts";
// Type definitions for Chalk // Definitions by: Thomas Sauer <https://github.com/t-sauer> export const enum Level { None = 0, Basic = 1, Ansi256 = 2, TrueColor = 3 } export interface ChalkOptions { enabled?: boolean; level?: Level; } export interface ChalkConstructor { new (options?: ChalkOptions): Chalk; (options?: ChalkOptions): Chalk; } export interface ColorSupport { level: Level; hasBasic: boolean; has256: boolean; has16m: boolean; } export interface Chalk { (...text: string[]): string; (text: TemplateStringsArray, ...placeholders: string[]): string; constructor: ChalkConstructor; enabled: boolean; level: Level; rgb(r: number, g: number, b: number): this; hsl(h: number, s: number, l: number): this; hsv(h: number, s: number, v: number): this; hwb(h: number, w: number, b: number): this; bgHex(color: string): this; bgKeyword(color: string): this; bgRgb(r: number, g: number, b: number): this; bgHsl(h: number, s: number, l: number): this; bgHsv(h: number, s: number, v: number): this; bgHwb(h: number, w: number, b: number): this; hex(color: string): this; keyword(color: string): this; readonly reset: this; readonly bold: this; readonly dim: this; readonly italic: this; readonly underline: this; readonly inverse: this; readonly hidden: this; readonly strikethrough: this; readonly visible: this; readonly black: this; readonly red: this; readonly green: this; readonly yellow: this; readonly blue: this; readonly magenta: this; readonly cyan: this; readonly white: this; readonly gray: this; readonly grey: this; readonly blackBright: this; readonly redBright: this; readonly greenBright: this; readonly yellowBright: this; readonly blueBright: this; readonly magentaBright: this; readonly cyanBright: this; readonly whiteBright: this; readonly bgBlack: this; readonly bgRed: this; readonly bgGreen: this; readonly bgYellow: this; readonly bgBlue: this; readonly bgMagenta: this; readonly bgCyan: this; readonly bgWhite: this; readonly bgBlackBright: this; readonly bgRedBright: this; readonly bgGreenBright: this; readonly bgYellowBright: this; readonly bgBlueBright: this; readonly bgMagentaBright: this; readonly bgCyanBright: this; readonly bgWhiteBright: this; } declare const chalk: Chalk & { supportsColor: ColorSupport }; export default chalk
// This file is auto-generated! Do not modify it directly. /* eslint-disable import/no-extraneous-dependencies, @typescript-eslint/consistent-type-imports, prettier/prettier */ import * as _babel_types from '@babel/types'; type Plugin = | "asyncDoExpressions" | "asyncGenerators" | "bigInt" | "classPrivateMethods" | "classPrivateProperties" | "classProperties" | "classStaticBlock" // Enabled by default | "decimal" | "decorators-legacy" | "deferredImportEvaluation" | "decoratorAutoAccessors" | "destructuringPrivate" | "doExpressions" | "dynamicImport" | "explicitResourceManagement" | "exportDefaultFrom" | "exportNamespaceFrom" // deprecated | "flow" | "flowComments" | "functionBind" | "functionSent" | "importMeta" | "jsx" | "logicalAssignment" | "importAssertions" // deprecated | "importAttributes" | "importReflection" | "moduleBlocks" | "moduleStringNames" | "nullishCoalescingOperator" | "numericSeparator" | "objectRestSpread" | "optionalCatchBinding" | "optionalChaining" | "partialApplication" | "placeholders" | "privateIn" // Enabled by default | "regexpUnicodeSets" // Enabled by default | "sourcePhaseImports" | "throwExpressions" | "topLevelAwait" | "v8intrinsic" | ParserPluginWithOptions[0]; type ParserPluginWithOptions = | ["decorators", DecoratorsPluginOptions] | ["estree", { classFeatures?: boolean }] | ["importAttributes", { deprecatedAssertSyntax: boolean }] // @deprecated | ["moduleAttributes", { version: "may-2020" }] | ["optionalChainingAssign", { version: "2023-07" }] | ["pipelineOperator", PipelineOperatorPluginOptions] | ["recordAndTuple", RecordAndTuplePluginOptions] | ["flow", FlowPluginOptions] | ["typescript", TypeScriptPluginOptions]; type PluginConfig = Plugin | ParserPluginWithOptions; interface DecoratorsPluginOptions { decoratorsBeforeExport?: boolean; allowCallParenthesized?: boolean; } interface PipelineOperatorPluginOptions { proposal: "minimal" | "fsharp" | "hack" | "smart"; topicToken?: "%" | "#" | "@@" | "^^" | "^"; } interface RecordAndTuplePluginOptions { syntaxType: "bar" | "hash"; } interface FlowPluginOptions { all?: boolean; enums?: boolean; } interface TypeScriptPluginOptions { dts?: boolean; disallowAmbiguousJSXLike?: boolean; } // Type definitions for @babel/parser // Project: https://github.com/babel/babel/tree/main/packages/babel-parser // Definitions by: Troy Gerwien <https://github.com/yortus> // Marvin Hagemeister <https://github.com/marvinhagemeister> // Avi Vahl <https://github.com/AviVahl> // TypeScript Version: 2.9 /** * Parse the provided code as an entire ECMAScript program. */ declare function parse( input: string, options?: ParserOptions ): ParseResult<_babel_types.File>; /** * Parse the provided code as a single expression. */ declare function parseExpression( input: string, options?: ParserOptions ): ParseResult<_babel_types.Expression>; interface ParserOptions { /** * By default, import and export declarations can only appear at a program's top level. * Setting this option to true allows them anywhere where a statement is allowed. */ allowImportExportEverywhere?: boolean; /** * By default, await use is not allowed outside of an async function. * Set this to true to accept such code. */ allowAwaitOutsideFunction?: boolean; /** * By default, a return statement at the top level raises an error. * Set this to true to accept such code. */ allowReturnOutsideFunction?: boolean; /** * By default, new.target use is not allowed outside of a function or class. * Set this to true to accept such code. */ allowNewTargetOutsideFunction?: boolean; allowSuperOutsideMethod?: boolean; /** * By default, exported identifiers must refer to a declared variable. * Set this to true to allow export statements to reference undeclared variables. */ allow
UndeclaredExports?: boolean; /** * By default, Babel parser JavaScript code according to Annex B syntax. * Set this to `false` to disable such behavior. */ annexB?: boolean; /** * By default, Babel attaches comments to adjacent AST nodes. * When this option is set to false, comments are not attached. * It can provide up to 30% performance improvement when the input code has many comments. * @babel/eslint-parser will set it for you. * It is not recommended to use attachComment: false with Babel transform, * as doing so removes all the comments in output code, and renders annotations such as * /* istanbul ignore next *\/ nonfunctional. */ attachComment?: boolean; /** * By default, Babel always throws an error when it finds some invalid code. * When this option is set to true, it will store the parsing error and * try to continue parsing the invalid input file. */ errorRecovery?: boolean; /** * Indicate the mode the code should be parsed in. * Can be one of "script", "module", or "unambiguous". Defaults to "script". * "unambiguous" will make @babel/parser attempt to guess, based on the presence * of ES6 import or export statements. * Files with ES6 imports and exports are considered "module" and are otherwise "script". */ sourceType?: "script" | "module" | "unambiguous"; /** * Correlate output AST nodes with their source filename. * Useful when generating code and source maps from the ASTs of multiple input files. */ sourceFilename?: string; /** * By default, the first line of code parsed is treated as line 1. * You can provide a line number to alternatively start with. * Useful for integration with other source tools. */ startLine?: number; /** * By default, the parsed code is treated as if it starts from line 1, column 0. * You can provide a column number to alternatively start with. * Useful for integration with other source tools. */ startColumn?: number; /** * Array containing the plugins that you want to enable. */ plugins?: ParserPlugin[]; /** * Should the parser work in strict mode. * Defaults to true if sourceType === 'module'. Otherwise, false. */ strictMode?: boolean; /** * Adds a ranges property to each node: [node.start, node.end] */ ranges?: boolean; /** * Adds all parsed tokens to a tokens property on the File node. */ tokens?: boolean; /** * By default, the parser adds information about parentheses by setting * `extra.parenthesized` to `true` as needed. * When this option is `true` the parser creates `ParenthesizedExpression` * AST nodes instead of using the `extra` property. */ createParenthesizedExpressions?: boolean; /** * The default is false in Babel 7 and true in Babel 8 * Set this to true to parse it as an `ImportExpression` node. * Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`. */ createImportExpressions?: boolean; } type ParserPlugin = PluginConfig; declare const tokTypes: { // todo(flow->ts) real token type [name: string]: any; }; interface ParseError { code: string; reasonCode: string; } type ParseResult<Result> = Result & { errors: ParseError[]; }; export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
// Type definitions for Chalk // Definitions by: Thomas Sauer <https://github.com/t-sauer> export const enum Level { None = 0, Basic = 1, Ansi256 = 2, TrueColor = 3 } export interface ChalkOptions { enabled?: boolean; level?: Level; } export interface ChalkConstructor { new (options?: ChalkOptions): Chalk; (options?: ChalkOptions): Chalk; } export interface ColorSupport { level: Level; hasBasic: boolean; has256: boolean; has16m: boolean; } export interface Chalk { (...text: string[]): string; (text: TemplateStringsArray, ...placeholders: string[]): string; constructor: ChalkConstructor; enabled: boolean; level: Level; rgb(r: number, g: number, b: number): this; hsl(h: number, s: number, l: number): this; hsv(h: number, s: number, v: number): this; hwb(h: number, w: number, b: number): this; bgHex(color: string): this; bgKeyword(color: string): this; bgRgb(r: number, g: number, b: number): this; bgHsl(h: number, s: number, l: number): this; bgHsv(h: number, s: number, v: number): this; bgHwb(h: number, w: number, b: number): this; hex(color: string): this; keyword(color: string): this; readonly reset: this; readonly bold: this; readonly dim: this; readonly italic: this; readonly underline: this; readonly inverse: this; readonly hidden: this; readonly strikethrough: this; readonly visible: this; readonly black: this; readonly red: this; readonly green: this; readonly yellow: this; readonly blue: this; readonly magenta: this; readonly cyan: this; readonly white: this; readonly gray: this; readonly grey: this; readonly blackBright: this; readonly redBright: this; readonly greenBright: this; readonly yellowBright: this; readonly blueBright: this; readonly magentaBright: this; readonly cyanBright: this; readonly whiteBright: this; readonly bgBlack: this; readonly bgRed: this; readonly bgGreen: this; readonly bgYellow: this; readonly bgBlue: this; readonly bgMagenta: this; readonly bgCyan: this; readonly bgWhite: this; readonly bgBlackBright: this; readonly bgRedBright: this; readonly bgGreenBright: this; readonly bgYellowBright: this; readonly bgBlueBright: this; readonly bgMagentaBright: this; readonly bgCyanBright: this; readonly bgWhiteBright: this; } declare const chalk: Chalk & { supportsColor: ColorSupport }; export default chalk
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /// <reference types="node" /> import {Context} from 'vm'; import type {EnvironmentContext} from '@jest/environment'; import type {Global} from '@jest/types'; import type {JestEnvironment} from '@jest/environment'; import type {JestEnvironmentConfig} from '@jest/environment'; import {LegacyFakeTimers} from '@jest/fake-timers'; import {ModernFakeTimers} from '@jest/fake-timers'; import {ModuleMocker} from 'jest-mock'; declare class NodeEnvironment implements JestEnvironment<Timer> { context: Context | null; fakeTimers: LegacyFakeTimers<Timer> | null; fakeTimersModern: ModernFakeTimers | null; global: Global.Global; moduleMocker: ModuleMocker | null; customExportConditions: string[]; private _configuredExportConditions?; constructor(config: JestEnvironmentConfig, _context: EnvironmentContext); setup(): Promise<void>; teardown(): Promise<void>; exportConditions(): Array<string>; getVmContext(): Context | null; } export default NodeEnvironment; export declare const TestEnvironment: typeof NodeEnvironment; declare type Timer = { id: number; ref: () => Timer; unref: () => Timer; }; export {};
declare class Queue<ValueType> implements Iterable<ValueType> { /** The size of the queue. */ readonly size: number; /** Tiny queue data structure. The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow. @example ``` import Queue = require('yocto-queue'); const queue = new Queue(); queue.enqueue('🦄'); queue.enqueue('🌈'); console.log(queue.size); //=> 2 console.log(...queue); //=> '🦄 🌈' console.log(queue.dequeue()); //=> '🦄' console.log(queue.dequeue()); //=> '🌈' ``` */ constructor(); [Symbol.iterator](): IterableIterator<ValueType>; /** Add a value to the queue. */ enqueue(value: ValueType): void; /** Remove the next value in the queue. @returns The removed value or `undefined` if the queue is empty. */ dequeue(): ValueType | undefined; /** Clear the queue. */ clear(): void; } export = Queue;
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /// <reference types="node" /> import type {Config} from '@jest/types'; import type {Global} from '@jest/types'; declare const ARROW = ' \u203A '; declare const CLEAR: string; export declare function clearLine(stream: NodeJS.WriteStream): void; export declare function convertDescriptorToString( descriptor: Global.BlockNameLike | undefined, ): string; export declare function createDirectory(path: string): void; export declare function deepCyclicCopy<T>( value: T, options?: DeepCyclicCopyOptions, cycles?: WeakMap<any, any>, ): T; declare type DeepCyclicCopyOptions = { blacklist?: Set<string>; keepPrototype?: boolean; }; export declare class ErrorWithStack extends Error { constructor( message: string | undefined, callsite: (...args: Array<any>) => unknown, stackLimit?: number, ); } export declare function formatTime( time: number, prefixPower?: number, padLeftLength?: number, ): string; /** * Converts a list of globs into a function that matches a path against the * globs. * * Every time picomatch is called, it will parse the glob strings and turn * them into regexp instances. Instead of calling picomatch repeatedly with * the same globs, we can use this function which will build the picomatch * matchers ahead of time and then have an optimized path for determining * whether an individual path matches. * * This function is intended to match the behavior of `micromatch()`. * * @example * const isMatch = globsToMatcher(['*.js', '!*.test.js']); * isMatch('pizza.js'); // true * isMatch('pizza.test.js'); // false */ export declare function globsToMatcher(globs: Array<string>): Matcher; declare const ICONS: { failed: string; pending: string; success: string; todo: string; }; export declare function installCommonGlobals( globalObject: typeof globalThis, globals: Config.ConfigGlobals, ): typeof globalThis & Config.ConfigGlobals; export declare function interopRequireDefault(obj: any): any; export declare function invariant( condition: unknown, message?: string, ): asserts condition; export declare const isInteractive: boolean; export declare function isNonNullable<T>(value: T): value is NonNullable<T>; export declare function isPromise<T = unknown>( candidate: unknown, ): candidate is PromiseLike<T>; declare type Matcher = (str: string) => boolean; export declare function pluralize( word: string, count: number, ending?: string, ): string; declare namespace preRunMessage { export {print_2 as print, remove}; } export {preRunMessage}; declare function print_2(stream: NodeJS.WriteStream): void; declare function remove(stream: NodeJS.WriteStream): void; export declare function replacePathSepForGlob(path: string): string; export declare function requireOrImportModule<T>( filePath: string, applyInteropRequireDefault?: boolean, ): Promise<T>; export declare function setGlobal( globalToMutate: typeof globalThis | Global.Global, key: string, value: unknown, ): void; declare namespace specialChars { export {ARROW, ICONS, CLEAR}; } export {specialChars}; export declare function testPathPatternToRegExp( testPathPattern: Config.GlobalConfig['testPathPattern'], ): RegExp; export declare function tryRealpath(path: string): string; export {};
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ export declare function getType(value: unknown): ValueType; export declare const isPrimitive: (value: unknown) => boolean; declare type ValueType = | 'array' | 'bigint' | 'boolean' | 'function' | 'null' | 'number' | 'object' | 'regexp' | 'map' | 'set' | 'date' | 'string' | 'symbol' | 'undefined'; export {};
/// <reference types="node" /> import { Profiler } from 'inspector'; export declare type V8Coverage = ReadonlyArray<Profiler.ScriptCoverage>; export declare class CoverageInstrumenter { startInstrumenting(): Promise<void>; stopInstrumenting(): Promise<V8Coverage>; }
/** * Parses a JSON5 string, constructing the JavaScript value or object described * by the string. * @template T The type of the return value. * @param text The string to parse as JSON5. * @param reviver A function that prescribes how the value originally produced * by parsing is transformed before being returned. * @returns The JavaScript value converted from the JSON5 string. */ declare function parse<T = any>( text: string, reviver?: ((this: any, key: string, value: any) => any) | null, ): T export = parse
export declare const Space_Separator: RegExp export declare const ID_Start: RegExp export declare const ID_Continue: RegExp
declare type StringifyOptions = { /** * A function that alters the behavior of the stringification process, or an * array of String and Number objects that serve as a allowlist for * selecting/filtering the properties of the value object to be included in * the JSON5 string. If this value is null or not provided, all properties * of the object are included in the resulting JSON5 string. */ replacer?: | ((this: any, key: string, value: any) => any) | (string | number)[] | null /** * A String or Number object that's used to insert white space into the * output JSON5 string for readability purposes. If this is a Number, it * indicates the number of space characters to use as white space; this * number is capped at 10 (if it is greater, the value is just 10). Values * less than 1 indicate that no space should be used. If this is a String, * the string (or the first 10 characters of the string, if it's longer than * that) is used as white space. If this parameter is not provided (or is * null), no white space is used. If white space is used, trailing commas * will be used in objects and arrays. */ space?: string | number | null /** * A String representing the quote character to use when serializing * strings. */ quote?: string | null } /** * Converts a JavaScript value to a JSON5 string. * @param value The value to convert to a JSON5 string. * @param replacer A function that alters the behavior of the stringification * process. If this value is null or not provided, all properties of the object * are included in the resulting JSON5 string. * @param space A String or Number object that's used to insert white space into * the output JSON5 string for readability purposes. If this is a Number, it * indicates the number of space characters to use as white space; this number * is capped at 10 (if it is greater, the value is just 10). Values less than 1 * indicate that no space should be used. If this is a String, the string (or * the first 10 characters of the string, if it's longer than that) is used as * white space. If this parameter is not provided (or is null), no white space * is used. If white space is used, trailing commas will be used in objects and * arrays. * @returns The JSON5 string converted from the JavaScript value. */ declare function stringify( value: any, replacer?: ((this: any, key: string, value: any) => any) | null, space?: string | number | null, ): string /** * Converts a JavaScript value to a JSON5 string. * @param value The value to convert to a JSON5 string. * @param replacer An array of String and Number objects that serve as a * allowlist for selecting/filtering the properties of the value object to be * included in the JSON5 string. If this value is null or not provided, all * properties of the object are included in the resulting JSON5 string. * @param space A String or Number object that's used to insert white space into * the output JSON5 string for readability purposes. If this is a Number, it * indicates the number of space characters to use as white space; this number * is capped at 10 (if it is greater, the value is just 10). Values less than 1 * indicate that no space should be used. If this is a String, the string (or * the first 10 characters of the string, if it's longer than that) is used as * white space. If this parameter is not provided (or is null), no white space * is used. If white space is used, trailing commas will be used in objects and * arrays. * @returns The JSON5 string converted from the JavaScript value. */ declare function stringify( value: any, replacer: (string | number)[], space?: string | number | null, ): string /** * Converts a JavaScript value to a JSON5 string. * @param value The value to convert to a JSON5 string. * @param options An object specifying options. * @ret
urns The JSON5 string converted from the JavaScript value. */ declare function stringify(value: any, options: StringifyOptions): string export = stringify
export declare function isSpaceSeparator(c?: string): boolean export declare function isIdStartChar(c?: string): boolean export declare function isIdContinueChar(c?: string): boolean export declare function isDigit(c?: string): boolean export declare function isHexDigit(c?: string): boolean
import parse = require('./parse') import stringify = require('./stringify') export {parse, stringify}
/// <reference types="node"/> import {Stream} from 'stream'; declare class MaxBufferErrorClass extends Error { readonly name: 'MaxBufferError'; constructor(); } declare namespace getStream { interface Options { /** Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `MaxBufferError` error. @default Infinity */ readonly maxBuffer?: number; } interface OptionsWithEncoding<EncodingType = BufferEncoding> extends Options { /** [Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. @default 'utf8' */ readonly encoding?: EncodingType; } type MaxBufferError = MaxBufferErrorClass; } declare const getStream: { /** Get the `stream` as a string. @returns A promise that resolves when the end event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. @example ``` import * as fs from 'fs'; import getStream = require('get-stream'); (async () => { const stream = fs.createReadStream('unicorn.txt'); console.log(await getStream(stream)); // ,,))))))));, // __)))))))))))))), // \|/ -\(((((''''((((((((. // -*-==//////(('' . `)))))), // /|\ ))| o ;-. '((((( ,(, // ( `| / ) ;))))' ,_))^;(~ // | | | ,))((((_ _____------~~~-. %,;(;(>';'~ // o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ // ; ''''```` `: `:::|\,__,%% );`'; ~ // | _ ) / `:|`----' `-' // ______/\/~ | / / // /~;;.____/;;' / ___--,-( `;;;/ // / // _;______;'------~~~~~ /;;/\ / // // | | / ; \;;,\ // (<_ | ; /',/-----' _> // \_| ||_ //~;~~~~~~~~~ // `\_| (,~~ // \~\ // ~~ })(); ``` */ (stream: Stream, options?: getStream.OptionsWithEncoding): Promise<string>; /** Get the `stream` as a buffer. It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. */ buffer( stream: Stream, options?: getStream.Options ): Promise<Buffer>; /** Get the `stream` as an array of values. It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: - When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). - When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. - When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. */ array<StreamObjectModeType>( stream: Stream, options?: getStream.Options ): Promise<StreamObjectModeType[]>; array( stream: Stream, options: getStream.OptionsWithEncoding<'buffer'> ): Promise<Buffer[]>; array( stream: Stream, options: getStream.OptionsWithEncoding<BufferEncoding> ): Promise<string[]>; MaxBufferError: typeof MaxBufferErrorClass; }; export = getStream;
/** * Run update and print output to terminal. */ declare function updateDb(print?: (str: string) => void): Promise<void> export = updateDb
export var boundFnsHaveConfigurableLengths: boolean; export var boundFnsHaveWritableLengths: boolean; export var functionsHaveConfigurableLengths: boolean; export var functionsHaveWritableLengths: boolean; export declare let __proto__: null; //# sourceMappingURL=env.d.ts.map
declare namespace _exports { export { Func }; } declare const _exports: <T extends Func = Func>(fn: T, length: number, loose?: boolean) => T; export = _exports; type Func = (...args: unknown[]) => unknown; //# sourceMappingURL=index.d.ts.map
// Definitions by: Carlos Ballesteros Velasco <https://github.com/soywiz> // Leon Yu <https://github.com/leonyu> // BendingBender <https://github.com/BendingBender> // Maple Miao <https://github.com/mapleeit> /// <reference types="node" /> import * as stream from 'stream'; import * as http from 'http'; export = FormData; // Extracted because @types/node doesn't export interfaces. interface ReadableOptions { highWaterMark?: number; encoding?: string; objectMode?: boolean; read?(this: stream.Readable, size: number): void; destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => void): void; autoDestroy?: boolean; } interface Options extends ReadableOptions { writable?: boolean; readable?: boolean; dataSize?: number; maxDataSize?: number; pauseStreams?: boolean; } declare class FormData extends stream.Readable { constructor(options?: Options); append(key: string, value: any, options?: FormData.AppendOptions | string): void; getHeaders(userHeaders?: FormData.Headers): FormData.Headers; submit( params: string | FormData.SubmitOptions, callback?: (error: Error | null, response: http.IncomingMessage) => void ): http.ClientRequest; getBuffer(): Buffer; setBoundary(boundary: string): void; getBoundary(): string; getLength(callback: (err: Error | null, length: number) => void): void; getLengthSync(): number; hasKnownLength(): boolean; } declare namespace FormData { interface Headers { [key: string]: any; } interface AppendOptions { header?: string | Headers; knownLength?: number; filename?: string; filepath?: string; contentType?: string; } interface SubmitOptions extends http.RequestOptions { protocol?: 'https:' | 'http:'; } }
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {Config} from '@jest/types'; import type {MatcherContext} from 'expect'; import type {MatcherFunctionWithContext} from 'expect'; import {Plugin as Plugin_2} from 'pretty-format'; import {Plugins} from 'pretty-format'; import type {PrettyFormatOptions} from 'pretty-format'; export declare const addSerializer: (plugin: Plugin_2) => void; export declare const buildSnapshotResolver: ( config: Config.ProjectConfig, localRequire?: Promise<LocalRequire> | LocalRequire, ) => Promise<SnapshotResolver>; export declare const cleanup: ( fileSystem: FileSystem_2, update: Config.SnapshotUpdateState, snapshotResolver: SnapshotResolver, testPathIgnorePatterns?: Config.ProjectConfig['testPathIgnorePatterns'], ) => { filesRemoved: number; filesRemovedList: Array<string>; }; export declare interface Context extends MatcherContext { snapshotState: SnapshotState; } export declare const EXTENSION = 'snap'; declare interface FileSystem_2 { exists(path: string): boolean; matchFiles(pattern: RegExp | string): Array<string>; } export declare const getSerializers: () => Plugins; export declare const isSnapshotPath: (path: string) => boolean; declare type LocalRequire = (module: string) => unknown; declare type SaveStatus = { deleted: boolean; saved: boolean; }; declare type SnapshotFormat = Omit<PrettyFormatOptions, 'compareKeys'>; export declare interface SnapshotMatchers<R extends void | Promise<void>, T> { /** * This ensures that a value matches the most recent snapshot with property matchers. * Check out [the Snapshot Testing guide](https://jestjs.io/docs/snapshot-testing) for more information. */ toMatchSnapshot(hint?: string): R; /** * This ensures that a value matches the most recent snapshot. * Check out [the Snapshot Testing guide](https://jestjs.io/docs/snapshot-testing) for more information. */ toMatchSnapshot<U extends Record<keyof T, unknown>>( propertyMatchers: Partial<U>, hint?: string, ): R; /** * This ensures that a value matches the most recent snapshot with property matchers. * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. * Check out [the Snapshot Testing guide](https://jestjs.io/docs/snapshot-testing) for more information. */ toMatchInlineSnapshot(snapshot?: string): R; /** * This ensures that a value matches the most recent snapshot with property matchers. * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. * Check out [the Snapshot Testing guide](https://jestjs.io/docs/snapshot-testing) for more information. */ toMatchInlineSnapshot<U extends Record<keyof T, unknown>>( propertyMatchers: Partial<U>, snapshot?: string, ): R; /** * Used to test that a function throws a error matching the most recent snapshot when it is called. */ toThrowErrorMatchingSnapshot(hint?: string): R; /** * Used to test that a function throws a error matching the most recent snapshot when it is called. * Instead of writing the snapshot value to a .snap file, it will be written into the source code automatically. */ toThrowErrorMatchingInlineSnapshot(snapshot?: string): R; } declare type SnapshotMatchOptions = { readonly testName: string; readonly received: unknown; readonly key?: string; readonly inlineSnapshot?: string; readonly isInline: boolean; readonly error?: Error; }; export declare type SnapshotResolver = { /** Resolves from `testPath` to snapshot path. */ resolveSnapshotPath(testPath: string, snapshotExtension?: string): string; /** Resolves from `snapshotPath` to test path. */ resolveTestPath(snapshotPath: string, snapshotExtension?: string): string; /** Example test
path, used for preflight consistency check of the implementation above. */ testPathForConsistencyCheck: string; }; declare type SnapshotReturnOptions = { readonly actual: string; readonly count: number; readonly expected?: string; readonly key: string; readonly pass: boolean; }; export declare class SnapshotState { private _counters; private _dirty; private _index; private readonly _updateSnapshot; private _snapshotData; private readonly _initialData; private readonly _snapshotPath; private _inlineSnapshots; private readonly _uncheckedKeys; private readonly _prettierPath; private readonly _rootDir; readonly snapshotFormat: SnapshotFormat; added: number; expand: boolean; matched: number; unmatched: number; updated: number; constructor(snapshotPath: string, options: SnapshotStateOptions); markSnapshotsAsCheckedForTest(testName: string): void; private _addSnapshot; clear(): void; save(): SaveStatus; getUncheckedCount(): number; getUncheckedKeys(): Array<string>; removeUncheckedKeys(): void; match({ testName, received, key, inlineSnapshot, isInline, error, }: SnapshotMatchOptions): SnapshotReturnOptions; fail(testName: string, _received: unknown, key?: string): string; } declare type SnapshotStateOptions = { readonly updateSnapshot: Config.SnapshotUpdateState; readonly prettierPath?: string | null; readonly expand?: boolean; readonly snapshotFormat: SnapshotFormat; readonly rootDir: string; }; export declare const toMatchInlineSnapshot: MatcherFunctionWithContext< Context, [propertiesOrSnapshot?: object | string, inlineSnapshot?: string] >; export declare const toMatchSnapshot: MatcherFunctionWithContext< Context, [propertiesOrHint?: object | string, hint?: string] >; export declare const toThrowErrorMatchingInlineSnapshot: MatcherFunctionWithContext< Context, [inlineSnapshot?: string, fromPromise?: boolean] >; export declare const toThrowErrorMatchingSnapshot: MatcherFunctionWithContext< Context, [hint?: string, fromPromise?: boolean] >; export {};
/// <reference types="node"/> import {LiteralUnion} from 'type-fest'; declare namespace ansiEscapes { interface ImageOptions { /** The width is given as a number followed by a unit, or the word `'auto'`. - `N`: N character cells. - `Npx`: N pixels. - `N%`: N percent of the session's width or height. - `auto`: The image's inherent size will be used to determine an appropriate dimension. */ readonly width?: LiteralUnion<'auto', number | string>; /** The height is given as a number followed by a unit, or the word `'auto'`. - `N`: N character cells. - `Npx`: N pixels. - `N%`: N percent of the session's width or height. - `auto`: The image's inherent size will be used to determine an appropriate dimension. */ readonly height?: LiteralUnion<'auto', number | string>; readonly preserveAspectRatio?: boolean; } interface AnnotationOptions { /** Nonzero number of columns to annotate. Default: The remainder of the line. */ readonly length?: number; /** Starting X coordinate. Must be used with `y` and `length`. Default: The cursor position */ readonly x?: number; /** Starting Y coordinate. Must be used with `x` and `length`. Default: Cursor position. */ readonly y?: number; /** Create a "hidden" annotation. Annotations created this way can be shown using the "Show Annotations" iTerm command. */ readonly isHidden?: boolean; } } declare const ansiEscapes: { /** Set the absolute position of the cursor. `x0` `y0` is the top left of the screen. */ cursorTo(x: number, y?: number): string; /** Set the position of the cursor relative to its current position. */ cursorMove(x: number, y?: number): string; /** Move cursor up a specific amount of rows. @param count - Count of rows to move up. Default is `1`. */ cursorUp(count?: number): string; /** Move cursor down a specific amount of rows. @param count - Count of rows to move down. Default is `1`. */ cursorDown(count?: number): string; /** Move cursor forward a specific amount of rows. @param count - Count of rows to move forward. Default is `1`. */ cursorForward(count?: number): string; /** Move cursor backward a specific amount of rows. @param count - Count of rows to move backward. Default is `1`. */ cursorBackward(count?: number): string; /** Move cursor to the left side. */ cursorLeft: string; /** Save cursor position. */ cursorSavePosition: string; /** Restore saved cursor position. */ cursorRestorePosition: string; /** Get cursor position. */ cursorGetPosition: string; /** Move cursor to the next line. */ cursorNextLine: string; /** Move cursor to the previous line. */ cursorPrevLine: string; /** Hide cursor. */ cursorHide: string; /** Show cursor. */ cursorShow: string; /** Erase from the current cursor position up the specified amount of rows. @param count - Count of rows to erase. */ eraseLines(count: number): string; /** Erase from the current cursor position to the end of the current line. */ eraseEndLine: string; /** Erase from the current cursor position to the start of the current line. */ eraseStartLine: string; /** Erase the entire current line. */ eraseLine: string; /** Erase the screen from the current line down to the bottom of the screen. */ eraseDown: string; /** Erase the screen from the current line up to the top of the screen. */ eraseUp: string; /** Erase the screen and move the cursor the top left position. */ eraseScreen: string; /** Scroll display up one line. */ scrollUp: string; /** Scroll display down one line. */ scrollDown: string; /** Clear the terminal screen. (Viewport) */ clearScreen: string; /** Clear the whole terminal, including scrollback buffer. (Not just the visible part of it) */ clearTerminal: string; /** Output a beeping sound. */ beep: string; /** Create a clickable link. [Supported terminals.](https://gist.github.
com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) Use [`supports-hyperlinks`](https://github.com/jamestalmage/supports-hyperlinks) to detect link support. */ link(text: string, url: string): string; /** Display an image. _Currently only supported on iTerm2 >=3_ See [term-img](https://github.com/sindresorhus/term-img) for a higher-level module. @param buffer - Buffer of an image. Usually read in with `fs.readFile()`. */ image(buffer: Buffer, options?: ansiEscapes.ImageOptions): string; iTerm: { /** [Inform iTerm2](https://www.iterm2.com/documentation-escape-codes.html) of the current directory to help semantic history and enable [Cmd-clicking relative paths](https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click). @param cwd - Current directory. Default: `process.cwd()`. */ setCwd(cwd?: string): string; /** An annotation looks like this when shown: ![screenshot of iTerm annotation](https://user-images.githubusercontent.com/924465/64382136-b60ac700-cfe9-11e9-8a35-9682e8dc4b72.png) See the [iTerm Proprietary Escape Codes documentation](https://iterm2.com/documentation-escape-codes.html) for more information. @param message - The message to display within the annotation. The `|` character is disallowed and will be stripped. @returns An escape code which will create an annotation when printed in iTerm2. */ annotation(message: string, options?: ansiEscapes.AnnotationOptions): string; }; // TODO: remove this in the next major version default: typeof ansiEscapes; }; export = ansiEscapes;
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {Config} from '@jest/types'; import type {StackData} from 'stack-utils'; import type {TestResult} from '@jest/types'; export declare const formatExecError: ( error: Error | TestResult.SerializableError | string | number | undefined, config: StackTraceConfig, options: StackTraceOptions, testPath?: string, reuseMessage?: boolean, noTitle?: boolean, ) => string; export declare const formatPath: ( line: string, config: StackTraceConfig, relativeTestPath?: string | null, ) => string; export declare const formatResultsErrors: ( testResults: Array<TestResult.AssertionResult>, config: StackTraceConfig, options: StackTraceOptions, testPath?: string, ) => string | null; export declare const formatStackTrace: ( stack: string, config: StackTraceConfig, options: StackTraceOptions, testPath?: string, ) => string; export declare interface Frame extends StackData { file: string; } export declare const getStackTraceLines: ( stack: string, options?: StackTraceOptions, ) => Array<string>; export declare const getTopFrame: (lines: Array<string>) => Frame | null; export declare const indentAllLines: (lines: string) => string; export declare const separateMessageFromStack: (content: string) => { message: string; stack: string; }; export declare type StackTraceConfig = Pick< Config.ProjectConfig, 'rootDir' | 'testMatch' >; export declare type StackTraceOptions = { noStackTrace: boolean; noCodeFrame?: boolean; }; export {};
declare namespace camelcase { interface Options { /** Uppercase the first character: `foo-bar` → `FooBar`. @default false */ readonly pascalCase?: boolean; /** Preserve the consecutive uppercase characters: `foo-BAR` → `FooBAR`. @default false */ readonly preserveConsecutiveUppercase?: boolean; /** The locale parameter indicates the locale to be used to convert to upper/lower case according to any locale-specific case mappings. If multiple locales are given in an array, the best available locale is used. Setting `locale: false` ignores the platform locale and uses the [Unicode Default Case Conversion](https://unicode-org.github.io/icu/userguide/transforms/casemappings.html#simple-single-character-case-mapping) algorithm. Default: The host environment’s current locale. @example ``` import camelCase = require('camelcase'); camelCase('lorem-ipsum', {locale: 'en-US'}); //=> 'loremIpsum' camelCase('lorem-ipsum', {locale: 'tr-TR'}); //=> 'loremİpsum' camelCase('lorem-ipsum', {locale: ['en-US', 'en-GB']}); //=> 'loremIpsum' camelCase('lorem-ipsum', {locale: ['tr', 'TR', 'tr-TR']}); //=> 'loremİpsum' ``` */ readonly locale?: false | string | readonly string[]; } } /** Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. Correctly handles Unicode strings. @param input - String to convert to camel case. @example ``` import camelCase = require('camelcase'); camelCase('foo-bar'); //=> 'fooBar' camelCase('foo_bar'); //=> 'fooBar' camelCase('Foo-Bar'); //=> 'fooBar' camelCase('розовый_пушистый_единорог'); //=> 'розовыйПушистыйЕдинорог' camelCase('Foo-Bar', {pascalCase: true}); //=> 'FooBar' camelCase('--foo.bar', {pascalCase: false}); //=> 'fooBar' camelCase('Foo-BAR', {preserveConsecutiveUppercase: true}); //=> 'fooBAR' camelCase('fooBAR', {pascalCase: true, preserveConsecutiveUppercase: true})); //=> 'FooBAR' camelCase('foo bar'); //=> 'fooBar' console.log(process.argv[3]); //=> '--foo-bar' camelCase(process.argv[3]); //=> 'fooBar' camelCase(['foo', 'bar']); //=> 'fooBar' camelCase(['__foo__', '--bar'], {pascalCase: true}); //=> 'FooBar' camelCase(['foo', 'BAR'], {pascalCase: true, preserveConsecutiveUppercase: true}) //=> 'FooBAR' camelCase('lorem-ipsum', {locale: 'en-US'}); //=> 'loremIpsum' ``` */ declare function camelcase( input: string | readonly string[], options?: camelcase.Options ): string; export = camelcase;
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {Config} from '@jest/types'; import type {Options} from 'yargs'; export declare const createDidYouMeanMessage: ( unrecognized: string, allowedOptions: Array<string>, ) => string; declare type DeprecatedOptionFunc = (arg: Record<string, unknown>) => string; export declare type DeprecatedOptions = Record<string, DeprecatedOptionFunc>; export declare const format: (value: unknown) => string; export declare const logValidationWarning: ( name: string, message: string, comment?: string | null, ) => void; export declare function multipleValidOptions<T extends Array<unknown>>( ...args: T ): T[number]; declare type Title = { deprecation?: string; error?: string; warning?: string; }; export declare const validate: ( config: Record<string, unknown>, options: ValidationOptions, ) => { hasDeprecationWarnings: boolean; isValid: boolean; }; export declare function validateCLIOptions( argv: Config.Argv, options?: Record<string, Options> & { deprecationEntries?: DeprecatedOptions; }, rawArgv?: Array<string>, ): boolean; export declare class ValidationError extends Error { name: string; message: string; constructor(name: string, message: string, comment?: string | null); } declare type ValidationOptions = { comment?: string; condition?: (option: unknown, validOption: unknown) => boolean; deprecate?: ( config: Record<string, unknown>, option: string, deprecatedOptions: DeprecatedOptions, options: ValidationOptions, ) => boolean; deprecatedConfig?: DeprecatedOptions; error?: ( option: string, received: unknown, defaultValue: unknown, options: ValidationOptions, path?: Array<string>, ) => void; exampleConfig: Record<string, unknown>; recursive?: boolean; recursiveDenylist?: Array<string>; title?: Title; unknown?: ( config: Record<string, unknown>, exampleConfig: Record<string, unknown>, option: string, options: ValidationOptions, path?: Array<string>, ) => void; }; export {};
import {YargsFactory} from './build/lib/yargs-factory'; declare const Yargs: ReturnType<typeof YargsFactory>; export default Yargs;
declare const isGeneratorFn: { /** Check if something is a generator function. @example ``` import isGeneratorFn = require('is-generator-fn'); isGeneratorFn(function * () {}); //=> true isGeneratorFn(function () {}); //=> false ``` */ (value: unknown): value is GeneratorFunction; // TODO: Remove this for the next major release, refactor the whole definition to: // declare function isGeneratorFn(value: unknown): value is GeneratorFunction; // export = isGeneratorFn; default: typeof isGeneratorFn; }; export = isGeneratorFn;
declare module "ipaddr.js" { type IPv4Range = 'unicast' | 'unspecified' | 'broadcast' | 'multicast' | 'linkLocal' | 'loopback' | 'carrierGradeNat' | 'private' | 'reserved'; type IPv6Range = 'unicast' | 'unspecified' | 'linkLocal' | 'multicast' | 'loopback' | 'uniqueLocal' | 'ipv4Mapped' | 'rfc6145' | 'rfc6052' | '6to4' | 'teredo' | 'reserved'; interface RangeList<T> { [name: string]: [T, number] | [T, number][]; } // Common methods/properties for IPv4 and IPv6 classes. class IP { prefixLengthFromSubnetMask(): number | null; toByteArray(): number[]; toNormalizedString(): string; toString(): string; } namespace Address { export function isValid(addr: string): boolean; export function fromByteArray(bytes: number[]): IPv4 | IPv6; export function parse(addr: string): IPv4 | IPv6; export function parseCIDR(mask: string): [IPv4 | IPv6, number]; export function process(addr: string): IPv4 | IPv6; export function subnetMatch(addr: IPv4, rangeList: RangeList<IPv4>, defaultName?: string): string; export function subnetMatch(addr: IPv6, rangeList: RangeList<IPv6>, defaultName?: string): string; export class IPv4 extends IP { static broadcastAddressFromCIDR(addr: string): IPv4; static isIPv4(addr: string): boolean; static isValidFourPartDecimal(addr: string): boolean; static isValid(addr: string): boolean; static networkAddressFromCIDR(addr: string): IPv4; static parse(addr: string): IPv4; static parseCIDR(addr: string): [IPv4, number]; static subnetMaskFromPrefixLength(prefix: number): IPv4; constructor(octets: number[]); octets: number[] kind(): 'ipv4'; match(addr: IPv4, bits: number): boolean; match(mask: [IPv4, number]): boolean; range(): IPv4Range; subnetMatch(rangeList: RangeList<IPv4>, defaultName?: string): string; toIPv4MappedAddress(): IPv6; } export class IPv6 extends IP { static broadcastAddressFromCIDR(addr: string): IPv6; static isIPv6(addr: string): boolean; static isValid(addr: string): boolean; static parse(addr: string): IPv6; static parseCIDR(addr: string): [IPv6, number]; static subnetMaskFromPrefixLength(prefix: number): IPv6; constructor(parts: number[]); parts: number[] zoneId?: string isIPv4MappedAddress(): boolean; kind(): 'ipv6'; match(addr: IPv6, bits: number): boolean; match(mask: [IPv6, number]): boolean; range(): IPv6Range; subnetMatch(rangeList: RangeList<IPv6>, defaultName?: string): string; toIPv4Address(): IPv4; } } export = Address; }
export = valueToString; /** * Returns a string representation of the value * @param {*} value * @returns {string} */ declare function valueToString(value: any): string;
export = orderByFirstCall; /** * A Sinon proxy object (fake, spy, stub) * @typedef {object} SinonProxy * @property {Function} getCall - A method that can return the first call */ /** * Sorts an array of SinonProxy instances (fake, spy, stub) by their first call * @param {SinonProxy[] | SinonProxy} spies * @returns {SinonProxy[]} */ declare function orderByFirstCall(spies: SinonProxy[] | SinonProxy): SinonProxy[]; declare namespace orderByFirstCall { export { SinonProxy }; } /** * A Sinon proxy object (fake, spy, stub) */ type SinonProxy = { /** * - A method that can return the first call */ getCall: Function; };
export = calledInOrder; /** * A Sinon proxy object (fake, spy, stub) * @typedef {object} SinonProxy * @property {Function} calledBefore - A method that determines if this proxy was called before another one * @property {string} id - Some id * @property {number} callCount - Number of times this proxy has been called */ /** * Returns true when the spies have been called in the order they were supplied in * @param {SinonProxy[] | SinonProxy} spies An array of proxies, or several proxies as arguments * @returns {boolean} true when spies are called in order, false otherwise */ declare function calledInOrder(spies: SinonProxy[] | SinonProxy, ...args: any[]): boolean; declare namespace calledInOrder { export { SinonProxy }; } /** * A Sinon proxy object (fake, spy, stub) */ type SinonProxy = { /** * - A method that determines if this proxy was called before another one */ calledBefore: Function; /** * - Some id */ id: string; /** * - Number of times this proxy has been called */ callCount: number; };
export function wrap(func: Function, msg: string): Function; export function defaultMsg(packageName: string, funcName: string): string; export function printWarning(msg: string): undefined;
export = className; /** * Returns a display name for a value from a constructor * @param {object} value A value to examine * @returns {(string|null)} A string or null */ declare function className(value: object): (string | null);
export = globalObject; /** * A reference to the global object * @type {object} globalObject */ declare var globalObject: object;
export const global: any; export const calledInOrder: typeof import("./called-in-order"); export const className: typeof import("./class-name"); export const deprecated: typeof import("./deprecated"); export const every: (obj: any, fn: Function) => boolean; export const functionName: (func: Function) => string; export const orderByFirstCall: typeof import("./order-by-first-call"); export const prototypes: { array: any; function: any; map: any; object: any; set: any; string: any; }; export const typeOf: (value: any) => string; export const valueToString: typeof import("./value-to-string");
export = throwsOnProto; /** * Is true when the environment causes an error to be thrown for accessing the * __proto__ property. * This is necessary in order to support `node --disable-proto=throw`. * * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto * @type {boolean} */ declare let throwsOnProto: boolean;
export declare const array: any; declare const _function: any; export { _function as function }; export declare const map: any; export declare const object: any; export declare const set: any; export declare const string: any;
export interface StartOfSourceMap { file?: string; sourceRoot?: string; } export interface RawSourceMap extends StartOfSourceMap { version: string; sources: string[]; names: string[]; sourcesContent?: string[]; mappings: string; } export interface Position { line: number; column: number; } export interface LineRange extends Position { lastColumn: number; } export interface FindPosition extends Position { // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND bias?: number; } export interface SourceFindPosition extends FindPosition { source: string; } export interface MappedPosition extends Position { source: string; name?: string; } export interface MappingItem { source: string; generatedLine: number; generatedColumn: number; originalLine: number; originalColumn: number; name: string; } export class SourceMapConsumer { static GENERATED_ORDER: number; static ORIGINAL_ORDER: number; static GREATEST_LOWER_BOUND: number; static LEAST_UPPER_BOUND: number; constructor(rawSourceMap: RawSourceMap); computeColumnSpans(): void; originalPositionFor(generatedPosition: FindPosition): MappedPosition; generatedPositionFor(originalPosition: SourceFindPosition): LineRange; allGeneratedPositionsFor(originalPosition: MappedPosition): Position[]; hasContentsOfAllSources(): boolean; sourceContentFor(source: string, returnNullOnMissing?: boolean): string; eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void; } export interface Mapping { generated: Position; original: Position; source: string; name?: string; } export class SourceMapGenerator { constructor(startOfSourceMap?: StartOfSourceMap); static fromSourceMap(sourceMapConsumer: SourceMapConsumer): SourceMapGenerator; addMapping(mapping: Mapping): void; setSourceContent(sourceFile: string, sourceContent: string): void; applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void; toString(): string; } export interface CodeWithSourceMap { code: string; map: SourceMapGenerator; } export class SourceNode { constructor(); constructor(line: number, column: number, source: string); constructor(line: number, column: number, source: string, chunk?: string, name?: string); static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode; add(chunk: string): void; prepend(chunk: string): void; setSourceContent(sourceFile: string, sourceContent: string): void; walk(fn: (chunk: string, mapping: MappedPosition) => void): void; walkSourceContents(fn: (file: string, content: string) => void): void; join(sep: string): SourceNode; replaceRight(pattern: string, replacement: string): SourceNode; toString(): string; toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap; }
declare namespace ansiStyles { interface CSPair { /** The ANSI terminal control sequence for starting this style. */ readonly open: string; /** The ANSI terminal control sequence for ending this style. */ readonly close: string; } interface ColorBase { /** The ANSI terminal control sequence for ending this color. */ readonly close: string; ansi256(code: number): string; ansi16m(red: number, green: number, blue: number): string; } interface Modifier { /** Resets the current color chain. */ readonly reset: CSPair; /** Make text bold. */ readonly bold: CSPair; /** Emitting only a small amount of light. */ readonly dim: CSPair; /** Make text italic. (Not widely supported) */ readonly italic: CSPair; /** Make text underline. (Not widely supported) */ readonly underline: CSPair; /** Make text overline. Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash. */ readonly overline: CSPair; /** Inverse background and foreground colors. */ readonly inverse: CSPair; /** Prints the text, but makes it invisible. */ readonly hidden: CSPair; /** Puts a horizontal line through the center of the text. (Not widely supported) */ readonly strikethrough: CSPair; } interface ForegroundColor { readonly black: CSPair; readonly red: CSPair; readonly green: CSPair; readonly yellow: CSPair; readonly blue: CSPair; readonly cyan: CSPair; readonly magenta: CSPair; readonly white: CSPair; /** Alias for `blackBright`. */ readonly gray: CSPair; /** Alias for `blackBright`. */ readonly grey: CSPair; readonly blackBright: CSPair; readonly redBright: CSPair; readonly greenBright: CSPair; readonly yellowBright: CSPair; readonly blueBright: CSPair; readonly cyanBright: CSPair; readonly magentaBright: CSPair; readonly whiteBright: CSPair; } interface BackgroundColor { readonly bgBlack: CSPair; readonly bgRed: CSPair; readonly bgGreen: CSPair; readonly bgYellow: CSPair; readonly bgBlue: CSPair; readonly bgCyan: CSPair; readonly bgMagenta: CSPair; readonly bgWhite: CSPair; /** Alias for `bgBlackBright`. */ readonly bgGray: CSPair; /** Alias for `bgBlackBright`. */ readonly bgGrey: CSPair; readonly bgBlackBright: CSPair; readonly bgRedBright: CSPair; readonly bgGreenBright: CSPair; readonly bgYellowBright: CSPair; readonly bgBlueBright: CSPair; readonly bgCyanBright: CSPair; readonly bgMagentaBright: CSPair; readonly bgWhiteBright: CSPair; } interface ConvertColor { /** Convert from the RGB color space to the ANSI 256 color space. @param red - (`0...255`) @param green - (`0...255`) @param blue - (`0...255`) */ rgbToAnsi256(red: number, green: number, blue: number): number; /** Convert from the RGB HEX color space to the RGB color space. @param hex - A hexadecimal string containing RGB data. */ hexToRgb(hex: string): [red: number, green: number, blue: number]; /** Convert from the RGB HEX color space to the ANSI 256 color space. @param hex - A hexadecimal string containing RGB data. */ hexToAnsi256(hex: string): number; } } declare const ansiStyles: { readonly modifier: ansiStyles.Modifier; readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; readonly codes: ReadonlyMap<number, number>; } & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier & ansiStyles.ConvertColor; export = ansiStyles;
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {SnapshotFormat} from '@jest/schemas'; export declare type Colors = { comment: { close: string; open: string; }; content: { close: string; open: string; }; prop: { close: string; open: string; }; tag: { close: string; open: string; }; value: { close: string; open: string; }; }; export declare type CompareKeys = | ((a: string, b: string) => number) | null | undefined; export declare type Config = { callToJSON: boolean; compareKeys: CompareKeys; colors: Colors; escapeRegex: boolean; escapeString: boolean; indent: string; maxDepth: number; maxWidth: number; min: boolean; plugins: Plugins; printBasicPrototype: boolean; printFunctionName: boolean; spacingInner: string; spacingOuter: string; }; export declare const DEFAULT_OPTIONS: { callToJSON: true; compareKeys: undefined; escapeRegex: false; escapeString: true; highlight: false; indent: number; maxDepth: number; maxWidth: number; min: false; plugins: never[]; printBasicPrototype: true; printFunctionName: true; theme: Required<{ readonly comment?: string | undefined; readonly content?: string | undefined; readonly prop?: string | undefined; readonly tag?: string | undefined; readonly value?: string | undefined; }>; }; /** * Returns a presentation string of your `val` object * @param val any potential JavaScript object * @param options Custom settings */ declare function format(val: unknown, options?: OptionsReceived): string; export default format; export {format}; declare type Indent = (arg0: string) => string; export declare type NewPlugin = { serialize: ( val: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer, ) => string; test: Test; }; export declare type OldPlugin = { print: ( val: unknown, print: Print, indent: Indent, options: PluginOptions, colors: Colors, ) => string; test: Test; }; export declare interface Options extends Omit<RequiredOptions, 'compareKeys' | 'theme'> { compareKeys: CompareKeys; theme: Required<RequiredOptions['theme']>; } export declare type OptionsReceived = PrettyFormatOptions; declare type Plugin_2 = NewPlugin | OldPlugin; export {Plugin_2 as Plugin}; declare type PluginOptions = { edgeSpacing: string; min: boolean; spacing: string; }; export declare type Plugins = Array<Plugin_2>; export declare const plugins: { AsymmetricMatcher: NewPlugin; DOMCollection: NewPlugin; DOMElement: NewPlugin; Immutable: NewPlugin; ReactElement: NewPlugin; ReactTestComponent: NewPlugin; }; export declare interface PrettyFormatOptions extends Omit<SnapshotFormat, 'compareKeys'> { compareKeys?: CompareKeys; plugins?: Plugins; } declare type Print = (arg0: unknown) => string; export declare type Printer = ( val: unknown, config: Config, indentation: string, depth: number, refs: Refs, hasCalledToJSON?: boolean, ) => string; export declare type Refs = Array<unknown>; declare type RequiredOptions = Required<PrettyFormatOptions>; declare type Test = (arg0: any) => boolean; export declare type Theme = Options['theme']; export {};
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {Global} from '@jest/types'; export declare function bind<EachCallback extends Global.TestCallback>( cb: GlobalCallback, supportsDone?: boolean, needsEachError?: boolean, ): Global.EachTestFn<any>; declare const each: { (table: Global.EachTable, ...data: Global.TemplateData): ReturnType< typeof install >; withGlobal(g: Global): ( table: Global.EachTable, ...data: Global.TemplateData ) => { describe: { ( title: string, suite: Global.EachTestFn<Global.BlockFn>, timeout?: number, ): any; skip: any; only: any; }; fdescribe: any; fit: any; it: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; skip: any; only: any; concurrent: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; only: any; skip: any; }; }; test: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; skip: any; only: any; concurrent: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; only: any; skip: any; }; }; xdescribe: any; xit: any; xtest: any; }; }; export default each; declare type GlobalCallback = ( testName: string, fn: Global.ConcurrentTestFn, timeout?: number, eachError?: Error, ) => void; declare const install: ( g: Global, table: Global.EachTable, ...data: Global.TemplateData ) => { describe: { ( title: string, suite: Global.EachTestFn<Global.BlockFn>, timeout?: number, ): any; skip: any; only: any; }; fdescribe: any; fit: any; it: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; skip: any; only: any; concurrent: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; only: any; skip: any; }; }; test: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; skip: any; only: any; concurrent: { ( title: string, test: Global.EachTestFn<Global.TestFn>, timeout?: number, ): any; only: any; skip: any; }; }; xdescribe: any; xit: any; xtest: any; }; export {};
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ export declare type ClassLike = { new (...args: any): any; }; export declare type ConstructorLikeKeys<T> = keyof { [K in keyof T as Required<T>[K] extends ClassLike ? K : never]: T[K]; }; export declare const fn: <T extends FunctionLike = UnknownFunction>( implementation?: T | undefined, ) => Mock<T>; export declare type FunctionLike = (...args: any) => any; export declare type MethodLikeKeys<T> = keyof { [K in keyof T as Required<T>[K] extends FunctionLike ? K : never]: T[K]; }; /** * All what the internal typings need is to be sure that we have any-function. * `FunctionLike` type ensures that and helps to constrain the type as well. * The default of `UnknownFunction` makes sure that `any`s do not leak to the * user side. For instance, calling `fn()` without implementation will return * a mock of `(...args: Array<unknown>) => unknown` type. If implementation * is provided, its typings are inferred correctly. */ export declare interface Mock<T extends FunctionLike = UnknownFunction> extends Function, MockInstance<T> { new (...args: Parameters<T>): ReturnType<T>; (...args: Parameters<T>): ReturnType<T>; } export declare type Mocked<T> = T extends ClassLike ? MockedClass<T> : T extends FunctionLike ? MockedFunction<T> : T extends object ? MockedObject<T> : T; export declare const mocked: { <T extends object>( source: T, options?: { shallow: false; }, ): Mocked<T>; <T_1 extends object>( source: T_1, options: { shallow: true; }, ): MockedShallow<T_1>; }; export declare type MockedClass<T extends ClassLike> = MockInstance< (...args: ConstructorParameters<T>) => Mocked<InstanceType<T>> > & MockedObject<T>; export declare type MockedFunction<T extends FunctionLike> = MockInstance<T> & MockedObject<T>; declare type MockedFunctionShallow<T extends FunctionLike> = MockInstance<T> & T; export declare type MockedObject<T extends object> = { [K in keyof T]: T[K] extends ClassLike ? MockedClass<T[K]> : T[K] extends FunctionLike ? MockedFunction<T[K]> : T[K] extends object ? MockedObject<T[K]> : T[K]; } & T; declare type MockedObjectShallow<T extends object> = { [K in keyof T]: T[K] extends ClassLike ? MockedClass<T[K]> : T[K] extends FunctionLike ? MockedFunctionShallow<T[K]> : T[K]; } & T; export declare type MockedShallow<T> = T extends ClassLike ? MockedClass<T> : T extends FunctionLike ? MockedFunctionShallow<T> : T extends object ? MockedObjectShallow<T> : T; export declare type MockFunctionMetadata< T = unknown, MetadataType = MockMetadataType, > = MockMetadata<T, MetadataType>; export declare type MockFunctionMetadataType = MockMetadataType; declare type MockFunctionResult<T extends FunctionLike = UnknownFunction> = | MockFunctionResultIncomplete | MockFunctionResultReturn<T> | MockFunctionResultThrow; declare type MockFunctionResultIncomplete = { type: 'incomplete'; /** * Result of a single call to a mock function that has not yet completed. * This occurs if you test the result from within the mock function itself, * or from within a function that was called by the mock. */ value: undefined; }; declare type MockFunctionResultReturn< T extends FunctionLike = UnknownFunction, > = { type: 'return'; /** * Result of a single call to a mock function that returned. */ value: ReturnType<T>; }; declare type MockFunctionResultThrow = { type: 'throw'; /** * Result of a single call to a mock function that threw. */ value: unknown; }; declare type MockFunctionState<T extends FunctionLike = UnknownFunction> = { /** * List of the call arguments of all calls that have been made to the mock. */ calls: Array<Parameters<T>>; /** * Lis
t of all the object instances that have been instantiated from the mock. */ instances: Array<ReturnType<T>>; /** * List of all the function contexts that have been applied to calls to the mock. */ contexts: Array<ThisParameterType<T>>; /** * List of the call order indexes of the mock. Jest is indexing the order of * invocations of all mocks in a test file. The index is starting with `1`. */ invocationCallOrder: Array<number>; /** * List of the call arguments of the last call that was made to the mock. * If the function was not called, it will return `undefined`. */ lastCall?: Parameters<T>; /** * List of the results of all calls that have been made to the mock. */ results: Array<MockFunctionResult<T>>; }; export declare interface MockInstance< T extends FunctionLike = UnknownFunction, > { _isMockFunction: true; _protoImpl: Function; getMockImplementation(): T | undefined; getMockName(): string; mock: MockFunctionState<T>; mockClear(): this; mockReset(): this; mockRestore(): void; mockImplementation(fn: T): this; mockImplementationOnce(fn: T): this; withImplementation(fn: T, callback: () => Promise<unknown>): Promise<void>; withImplementation(fn: T, callback: () => void): void; mockName(name: string): this; mockReturnThis(): this; mockReturnValue(value: ReturnType<T>): this; mockReturnValueOnce(value: ReturnType<T>): this; mockResolvedValue(value: ResolveType<T>): this; mockResolvedValueOnce(value: ResolveType<T>): this; mockRejectedValue(value: RejectType<T>): this; mockRejectedValueOnce(value: RejectType<T>): this; } export declare type MockMetadata<T, MetadataType = MockMetadataType> = { ref?: number; members?: Record<string, MockMetadata<T>>; mockImpl?: T; name?: string; refID?: number; type?: MetadataType; value?: T; length?: number; }; export declare type MockMetadataType = | 'object' | 'array' | 'regexp' | 'function' | 'constant' | 'collection' | 'null' | 'undefined'; export declare class ModuleMocker { private readonly _environmentGlobal; private _mockState; private _mockConfigRegistry; private _spyState; private _invocationCallCounter; /** * @see README.md * @param global Global object of the test environment, used to create * mocks */ constructor(global: typeof globalThis); private _getSlots; private _ensureMockConfig; private _ensureMockState; private _defaultMockConfig; private _defaultMockState; private _makeComponent; private _createMockFunction; private _generateMock; /** * Check whether the given property of an object has been already replaced. */ private _findReplacedProperty; /** * @see README.md * @param metadata Metadata for the mock in the schema returned by the * getMetadata method of this module. */ generateFromMetadata<T>(metadata: MockMetadata<T>): Mocked<T>; /** * @see README.md * @param component The component for which to retrieve metadata. */ getMetadata<T = unknown>( component: T, _refs?: Map<T, number>, ): MockMetadata<T> | null; isMockFunction<T extends FunctionLike = UnknownFunction>( fn: MockInstance<T>, ): fn is MockInstance<T>; isMockFunction<P extends Array<unknown>, R>( fn: (...args: P) => R, ): fn is Mock<(...args: P) => R>; isMockFunction(fn: unknown): fn is Mock<UnknownFunction>; fn<T extends FunctionLike = UnknownFunction>(implementation?: T): Mock<T>; spyOn< T extends object, K extends PropertyLikeKeys<T>, V extends Required<T>[K], A extends 'get' | 'set', >( object: T, methodKey: K, accessType: A, ): A extends 'get' ? SpiedGetter<V> : A extends 'set' ? SpiedSetter<V> : never; spyOn< T extends object, K extends ConstructorLikeKeys<T> | MethodLikeKeys<T>, V extends Required<T>[K], >( object: T, methodKey: K, ): V extends ClassLike | FunctionLike ? Spied<V> : never; private _
spyOnProperty; replaceProperty<T extends object, K extends keyof T>( object: T, propertyKey: K, value: T[K], ): Replaced<T[K]>; clearAllMocks(): void; resetAllMocks(): void; restoreAllMocks(): void; private _typeOf; mocked<T extends object>( source: T, options?: { shallow: false; }, ): Mocked<T>; mocked<T extends object>( source: T, options: { shallow: true; }, ): MockedShallow<T>; } export declare type PropertyLikeKeys<T> = Exclude< keyof T, ConstructorLikeKeys<T> | MethodLikeKeys<T> >; declare type RejectType<T extends FunctionLike> = ReturnType<T> extends PromiseLike<any> ? unknown : never; export declare interface Replaced<T = unknown> { /** * Restore property to its original value known at the time of mocking. */ restore(): void; /** * Change the value of the property. */ replaceValue(value: T): this; } export declare const replaceProperty: <T extends object, K extends keyof T>( object: T, propertyKey: K, value: T[K], ) => Replaced<T[K]>; declare type ResolveType<T extends FunctionLike> = ReturnType<T> extends PromiseLike<infer U> ? U : never; export declare type Spied<T extends ClassLike | FunctionLike> = T extends ClassLike ? SpiedClass<T> : T extends FunctionLike ? SpiedFunction<T> : never; export declare type SpiedClass<T extends ClassLike = UnknownClass> = MockInstance<(...args: ConstructorParameters<T>) => InstanceType<T>>; export declare type SpiedFunction<T extends FunctionLike = UnknownFunction> = MockInstance<(...args: Parameters<T>) => ReturnType<T>>; export declare type SpiedGetter<T> = MockInstance<() => T>; export declare type SpiedSetter<T> = MockInstance<(arg: T) => void>; export declare interface SpyInstance<T extends FunctionLike = UnknownFunction> extends MockInstance<T> {} export declare const spyOn: { < T extends object, K_2 extends Exclude< keyof T, | keyof { [K in keyof T as Required<T>[K] extends ClassLike ? K : never]: T[K]; } | keyof { [K_1 in keyof T as Required<T>[K_1] extends FunctionLike ? K_1 : never]: T[K_1]; } >, V extends Required<T>[K_2], A extends 'set' | 'get', >( object: T, methodKey: K_2, accessType: A, ): A extends 'get' ? SpiedGetter<V> : A extends 'set' ? SpiedSetter<V> : never; < T_1 extends object, K_5 extends | keyof { [K_3 in keyof T_1 as Required<T_1>[K_3] extends ClassLike ? K_3 : never]: T_1[K_3]; } | keyof { [K_4 in keyof T_1 as Required<T_1>[K_4] extends FunctionLike ? K_4 : never]: T_1[K_4]; }, V_1 extends Required<T_1>[K_5], >( object: T_1, methodKey: K_5, ): V_1 extends ClassLike | FunctionLike ? Spied<V_1> : never; }; export declare type UnknownClass = { new (...args: Array<unknown>): unknown; }; export declare type UnknownFunction = (...args: Array<unknown>) => unknown; export {};
/** * Create a new error constructor instance. */ declare function makeError( name: string ): makeError.Constructor<makeError.BaseError>; /** * Set the constructor prototype to `BaseError`. */ declare function makeError<T extends Error>(super_: { new (...args: any[]): T; }): makeError.Constructor<T & makeError.BaseError>; /** * Create a specialized error instance. */ declare function makeError<T extends Error, K>( name: string | Function, super_: K ): K & makeError.SpecializedConstructor<T>; declare namespace makeError { /** * Use with ES2015+ inheritance. */ export class BaseError extends Error { message: string; name: string; stack: string; constructor(message?: string); } export interface Constructor<T> { new (message?: string): T; super_: any; prototype: T; } export interface SpecializedConstructor<T> { super_: any; prototype: T; } } export = makeError;
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {Identifier} from '@babel/types'; import type {PluginObj} from '@babel/core'; declare function jestHoist(): PluginObj<{ declareJestObjGetterIdentifier: () => Identifier; jestObjGetterIdentifier?: Identifier; }>; export default jestHoist; export {};
type JestResolverOptions = { basedir: string; defaultResolver: (request: string, opts: any) => string, extensions?: Array<string>, }; export default function resolve( request: string, options: JestResolverOptions, ): string;
declare const stringWidth: { /** Get the visual width of a string - the number of columns required to display it. Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. @example ``` import stringWidth = require('string-width'); stringWidth('a'); //=> 1 stringWidth('古'); //=> 2 stringWidth('\u001B[1m古\u001B[22m'); //=> 2 ``` */ (string: string): number; // TODO: remove this in the next major version, refactor the whole definition to: // declare function stringWidth(string: string): number; // export = stringWidth; default: typeof stringWidth; } export = stringWidth;
declare module 'validator' { export function contains( str: string, elem: any, options?: import('../src/options').ContainsOptions, ): boolean; export function equals(str: string, comparison: string): boolean; export function isAfter( str: string, dateOrOptions?: string | import('../src/options').IsAfterOptions, ): boolean; export function isAlpha( str: string, locale?: import('../src/options').AlphaLocale, options?: import('../src/options').IsAlphaOptions, ): boolean; export function isAlphanumeric( str: string, locale?: import('../src/options').AlphanumericLocale, options?: import('../src/options').IsAlphanumericOptions, ): boolean; export function isAscii(str: string): boolean; export function isBase32( str: string, options?: import('../src/options').IsBase32Options, ): boolean; export function isBase58(str: string): boolean; export function isBase64( str: string, options?: import('../src/options').IsBase64Options, ): boolean; export function isBefore(str: string, date?: string): boolean; export function isBIC(str: string): boolean; export function isBoolean( str: string, options?: import('../src/options').IsBooleanOptions, ): boolean; export function isBtcAddress(str: string): boolean; export function isByteLength( str: string, options: import('../src/options').MinMaxOptions, ): boolean; export function isCreditCard(str: string): boolean; export function isCurrency( str: string, options?: import('../src/options').IsCurrencyOptions, ): boolean; export function isDataURI(str: string): boolean; export function isDate(str: string, options?: import('../src/options').IsDateOptions): boolean; export function isDecimal( str: string, options?: import('../src/options').IsDecimalOptions, ): boolean; export function isDivisibleBy(str: string, number: number): boolean; export function isEAN(str: string): boolean; export function isEmail(str: string, options?: import('../src/options').IsEmailOptions): boolean; export function isEmpty(str: string, options?: import('../src/options').IsEmptyOptions): boolean; export function isEthereumAddress(str: string): boolean; export function isFQDN(str: string, options?: import('../src/options').IsFQDNOptions): boolean; export function isFloat(str: string, options?: import('../src/options').IsFloatOptions): boolean; export function isFullWidth(str: string): boolean; export function isHalfWidth(str: string): boolean; export function isHash(str: string, algorithm: import('../src/options').HashAlgorithm): boolean; export function isHexColor(str: string): boolean; export function isHexadecimal(str: string): boolean; export function isHSL(str: string): boolean; export function isIBAN(str: string): boolean; export function isIdentityCard( str: string, locale?: import('../src/options').IdentityCardLocale, ): boolean; export function isIMEI(str: string, options?: import('../src/options').IsIMEIOptions): boolean; export function isIP(str: string, version?: import('../src/options').IPVersion): boolean; export function isIPRange(str: string, version?: import('../src/options').IPVersion): boolean; export function isISBN( str: string, versionOrOptions?: number | import('../src/options').IsISBNOptions, ): boolean; export function isISSN(str: string, options?: import('../src/options').IsISSNOptions): boolean; export function isISIN(str: string): boolean; export function isISO8601( str: string, options?: import('../src/options').IsISO8601Options, ): boolean; export function isISO31661Alpha2(str: string): boolean; export function isISO31661Alpha3(str: string): boolean; export function isISO4217(str: string): boolean; export function isISRC(str: string): boolean; export function isIn(str: string, values: readonly any[]): boolean; export function isISO6391(str: string): boolean; export
function isInt(str: string, options?: import('../src/options').IsIntOptions): boolean; export function isJSON(str: string, options?: import('../src/options').IsJSONOptions): boolean; export function isJWT(str: string): boolean; export function isLatLong( str: string, options?: import('../src/options').IsLatLongOptions, ): boolean; export function isLength(str: string, options: import('../src/options').MinMaxOptions): boolean; export function isLicensePlate( str: string, locale: import('../src/options').IsLicensePlateLocale, ): boolean; export function isLocale(str: string): boolean; export function isLowercase(str: string): boolean; export function isLuhnNumber(str: string): boolean; export function isMagnetURI(str: string): boolean; export function isMACAddress( str: string, options: import('../src/options').IsMACAddressOptions, ): boolean; export function isMD5(str: string): boolean; export function isMimeType(str: string): boolean; export function isMobilePhone( str: string, locale: | import('../src/options').MobilePhoneLocale | readonly import('../src/options').MobilePhoneLocale[], options?: import('../src/options').IsMobilePhoneOptions, ): boolean; export function isMongoId(str: string): boolean; export function isMultibyte(str: string): boolean; export function isNumeric( str: string, options?: import('../src/options').IsNumericOptions, ): boolean; export function isOctal(str: string): boolean; export function isPassportNumber( str: string, countryCode?: import('../src/options').PassportCountryCode, ): boolean; export function isPort(str: string): boolean; export function isPostalCode( str: string, locale: import('../src/options').PostalCodeLocale, ): boolean; export function isRFC3339(str: string): boolean; export function isRgbColor(str: string, includePercentValues?: boolean): boolean; export function isSemVer(str: string): boolean; export function isSlug(str: string): boolean; export function isStrongPassword( str: string, options?: import('../src/options').IsStrongPasswordOptions, ): boolean; export function isSurrogatePair(str: string): boolean; export function isTaxID(str: string, locale: import('../src/options').TaxIDLocale): boolean; export function isTime(str: string, options?: import('../src/options').IsTimeOptions): boolean; export function isURL(str: string, options?: import('../src/options').IsURLOptions): boolean; export function isUUID(str: string, version?: import('../src/options').UUIDVersion): boolean; export function isUppercase(str: string): boolean; export function isVariableWidth(str: string): boolean; export function isVAT(str: string, countryCode: import('../src/options').VATCountryCode): boolean; export function isWhitelisted(str: string, chars: string | readonly string[]): boolean; export function matches(str: string, pattern: RegExp | string, modifiers?: string): boolean; export function blacklist(str: string, chars: string): string; export function escape(str: string): string; export function unescape(str: string): string; export function ltrim(str: string, chars?: string): string; export function normalizeEmail( str: string, options?: import('../src/options').NormalizeEmailOptions, ): string; export function rtrim(str: string, chars?: string): string; export function stripLow(str: string, keep_new_lines?: boolean): string; export function toBoolean(str: string, strict?: boolean): boolean; export function toDate(str: string): Date; export function toFloat(str: string): number; export function toInt(str: string, radix?: number): string; export function trim(str: string, chars?: string): string; export function whitelist(str: string, chars: string): string; export function toString(str: string): string; }
export declare type URLProtocol = 'http' | 'https' | 'ftp' | string; export declare type UUIDVersion = 1 | 2 | 3 | 4 | 5 | '1' | '2' | '3' | '4' | '5' | 'all'; export declare type IPVersion = 4 | 6; export declare type AlphaLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'bn-BD' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'he' | 'hi-IN' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'ku-IQ' | 'nb-NO' | 'nl-NL' | 'nn-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN'; export declare type AlphanumericLocale = 'ar' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-QA' | 'ar-QM' | 'ar-SA' | 'ar-SD' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'bg-BG' | 'bn-BD' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-AU' | 'en-GB' | 'en-HK' | 'en-IN' | 'en-NZ' | 'en-US' | 'en-ZA' | 'en-ZM' | 'es-ES' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'fr-BE' | 'he' | 'hi-IN' | 'hu-HU' | 'it-IT' | 'id-ID' | 'ja-JP' | 'ko-KR' | 'ku-IQ' | 'nb-NO' | 'nl-BE' | 'nl-NL' | 'nn-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'sr-RS' | 'sr-RS@latin' | 'sv-SE' | 'th-TH' | 'tr-TR' | 'uk-UA' | 'vi-VN'; export declare type MobilePhoneLocale = 'any' | 'am-AM' | 'ar-AE' | 'ar-BH' | 'ar-DZ' | 'ar-EG' | 'ar-EH' | 'ar-IQ' | 'ar-JO' | 'ar-KW' | 'ar-LB' | 'ar-LY' | 'ar-MA' | 'ar-OM' | 'ar-PS' | 'ar-SA' | 'ar-SY' | 'ar-TN' | 'ar-YE' | 'az-AZ' | 'be-BY' | 'bg-BG' | 'bn-BD' | 'bs-BA' | 'cs-CZ' | 'de-AT' | 'de-CH' | 'de-DE' | 'de-LU' | 'da-DK' | 'dv-MV' | 'dz-BT' | 'el-CY' | 'el-GR' | 'en-AG' | 'en-AI' | 'en-AU' | 'en-BM' | 'en-BS' | 'en-BW' | 'en-CA' | 'en-GB' | 'en-GG' | 'en-GH' | 'en-GY' | 'en-HK' | 'en-HN' | 'en-IE' | 'en-IN' | 'en-JM' | 'en-KE' | 'en-KI' | 'en-KN' | 'en-LS' | 'en-MT' | 'en-MU' | 'en-NA' | 'en-NG' | 'en-NZ' | 'en-PG' | 'en-PH' | 'en-PK' | 'en-RW' | 'en-SG' | 'en-SL' | 'en-SS' | 'en-TZ' | 'en-UG' | 'en-US' | 'en-ZA' | 'en-ZM' | 'en-ZW' | 'es-AR' | 'es-BO' | 'es-CL' | 'es-CO' | 'es-CR' | 'es-CU' | 'es-DO' | 'es-EC' | 'es-ES' | 'es-HN' | 'es-MX' | 'es-NI' | 'es-PA' | 'es-PE' | 'es-PY' | 'es-SV' | 'es-UY' | 'es-VE' | 'et-EE' | 'fa-AF' | 'fa-IR' | 'fi-FI' | 'fj-FJ' | 'fo-FO' | 'fr-BE' | 'fr-BF' | 'fr-BJ' | 'fr-CD' | 'fr-CH' | 'fr-CM' | 'fr-FR' | 'fr-GF' | 'fr-GP' | 'fr-MQ' | 'fr-PF' | 'fr-RE' | 'ga-IE' | 'he-IL' | 'hu-HU' | 'id-ID' | 'ir-IR' | 'it-CH' | 'it-IT' | 'it-SM' | 'ja-JP' | 'ka-GE' | 'kk-KZ' | 'kl-GL' | 'ko-KR' | 'ky-KG' | 'lt-LT' | 'lv-LV' | 'mg-MG' | 'mn-MN' | 'ms-MY' | 'my-MM' | 'mz-MZ' | 'nb-NO' | 'nl-AW' | 'nl-BE' | 'nl-NL' | 'ne-NP' | 'nn-NO' | 'pl-PL' | 'pt-AO' | 'pt-BR' | 'pt-PT' | 'ro-MD' | 'ro-RO' | 'ru-RU' | 'si-LK' | 'sk-SK' | 'sl-SI' | 'sq-AL' | 'sr-RS' | 'sv-SE' | 'tg-TJ' | 'th-TH' | 'tk-TM' | 'tr-TR' | 'uk-UA' | 'uz-Uz' | 'vi-VN' | 'zh-CN' | 'zh-HK' | 'zh-TW'; export declare type PostalCodeLocale = 'any' | 'AD' | 'AT' | 'AU' | 'AZ' | 'BA' | 'BE' | 'BG' | 'BR' | 'BY' | 'CA' | 'CH' | 'CN' | 'CZ' | 'DE' | 'DK' | 'DO' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HT' | 'HU' | 'ID' | 'IL' | 'IN' | 'IR' | 'IS' | 'IT' | 'JP' | 'KE' | 'KR' | 'LI' | 'LK' | 'LT' | 'LU' | 'LV' | 'MT' | 'MX' | 'MY' | 'NL' | 'NO' | 'NP' | 'NZ' | 'PL' | 'PR' | 'PT' | 'RO' | 'RU' | 'SA' | 'SE' | 'SG' | 'SI' | 'SK' | 'TH' | 'TN' | 'TW' | 'UA' | 'US' | 'ZA' | 'ZM'; export declare type HashAlgorithm = 'md4' | 'md5' | 'sha1' | 'sha256' | 'sha384' | 'sha512' | 'ripemd128' | 'ripemd160' | 'tiger128' | 'tiger160' | 'tiger192' | 'crc32' | 'crc32b'; export declare type IdentityCardLocale = 'any' | 'ar-LY' | 'ar-TN' | 'ES' | 'FI' | 'he-IL' | 'hk-HK' | 'IN' | 'IT' | 'IR' | 'MZ' | 'NO' | 'PL' | 'TH' | 'zh-
CN' | 'zh-TW'; export declare type PassportCountryCode = 'AM' | 'AR' | 'AT' | 'AU' | 'AZ' | 'BE' | 'BG' | 'BY' | 'BR' | 'CA' | 'CH' | 'CN' | 'CY' | 'CZ' | 'DE' | 'DK' | 'DZ' | 'EE' | 'ES' | 'FI' | 'FR' | 'GB' | 'GR' | 'HR' | 'HU' | 'ID' | 'IE' | 'IN' | 'IR' | 'IS' | 'IT' | 'JM' | 'JP' | 'KR' | 'KZ' | 'LI' | 'LT' | 'LU' | 'LV' | 'LY' | 'MT' | 'MY' | 'MZ' | 'NL' | 'NZ' | 'PH' | 'PK' | 'PL' | 'PO' | 'PT' | 'RO' | 'RU' | 'SE' | 'SL' | 'SK' | 'TH' | 'TR' | 'UA' | 'US'; export declare type IsLicensePlateLocale = 'cs-CZ' | 'de-DE' | 'de-LI' | 'en-NI' | 'es-AR' | 'fi-FI' | 'hu-HU' | 'pt-BR' | 'pt-PT' | 'sq-AL' | 'sv-SE' | 'any'; export declare type TaxIDLocale = 'bg-BG' | 'cs-CZ' | 'de-AT' | 'de-DE' | 'dk-DK' | 'el-CY' | 'el-GR' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-US' | 'es-ES' | 'et-EE' | 'fi-FI' | 'fr-BE' | 'fr-FR' | 'fr-LU' | 'hr-HR' | 'hu-HU' | 'it-IT' | 'lb-LU' | 'lt-LT' | 'lv-LV' | 'mt-MT' | 'nl-BE' | 'nl-NL' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'sl-SI' | 'sv-SE'; export declare type VATCountryCode = 'GB' | 'IT' | 'NL' | 'AT' | 'BE' | 'BG' | 'HR' | 'CY' | 'CZ' | 'DK' | 'EE' | 'FI' | 'FR' | 'DE' | 'EL' | 'HU' | 'IE' | 'LV' | 'LT' | 'LU' | 'MT' | 'PL' | 'PT' | 'RO' | 'SK' | 'SI' | 'ES' | 'SE' | 'AL' | 'MK' | 'AU' | 'BY' | 'CA' | 'IS' | 'IN' | 'ID' | 'IL' | 'KZ' | 'NZ' | 'NG' | 'NO' | 'PH' | 'RU' | 'SM' | 'SA' | 'RS' | 'CH' | 'TR' | 'UA' | 'UZ' | 'AR' | 'BO' | 'BR' | 'CL' | 'CO' | 'CR' | 'EC' | 'SV' | 'GT' | 'HN' | 'MX' | 'NI' | 'PA' | 'PY' | 'PE' | 'DO' | 'UY' | 'VE'; export interface MinMaxOptions { min?: number; max?: number; } export interface MinMaxExtendedOptions extends MinMaxOptions { lt?: number; gt?: number; } /** * defaults to * { * ignoreCase: false, * minOccurrences: 1 * } */ export interface ContainsOptions { ignoreCase?: boolean; minOccurrences?: number; } /** * defaults to * { * comparisonDate: Date().toString() * } */ export interface IsAfterOptions { comparisonDate?: string; } export interface IsAlphaOptions { ignore?: string | string[] | RegExp; } export interface IsAlphanumericOptions { ignore?: string | RegExp; } /** * defaults to * { * crockford: false * } */ export interface IsBase32Options { crockford?: boolean; } /** * defaults to * { * urlSafe: false * } */ export interface IsBase64Options { urlSafe?: boolean; } /** * defaults to * { * strict: false * loose: false * } */ export interface IsBooleanOptions { strict?: boolean; loose?: boolean; } export interface IsCreditCard { provider?: 'amex' | 'dinersclub' | 'discover' | 'jcb' | 'mastercard' | 'unionpay' | 'visa'; } /** * defaults to * { * symbol: '$', * require_symbol: false, * allow_space_after_symbol: false, * symbol_after_digits: false, * allow_negatives: true, * parens_for_negatives: false, * negative_sign_before_digits: false, * negative_sign_after_digits: false, * allow_negative_sign_placeholder: false, * thousands_separator: ',', * decimal_separator: '.', * allow_space_after_digits: false * } */ export interface IsCurrencyOptions { symbol?: string; require_symbol?: boolean; allow_space_after_symbol?: boolean; symbol_after_digits?: boolean; allow_negatives?: boolean; parens_for_negatives?: boolean; negative_sign_before_digits?: boolean; negative_sign_after_digits?: boolean; allow_negative_sign_placeholder?: boolean; thousands_separator?: string; decimal_separator?: string; allow_decimal?: boolean; require_decimal?: boolean; digits_after_decimal?: number[]; allow_space_after_digits?: boolean; } /** * defaults to * { * format: 'YYYY/MM/DD', * delimiters: ['/', '-'], * strictMode: false * } */ export interface IsDateOptions { format?: string; delimiters?: string[]; strictMode?: boolean; } export interface IsDecimalOptions { decimal_digits?: string; force_decimal?: boolean; locale?: AlphanumericLocale; black
listed_chars?: string; } export interface IsEmailOptions { allow_display_name?: boolean; allow_utf8_local_part?: boolean; require_tld?: boolean; ignore_max_length?: boolean; allow_ip_domain?: boolean; domain_specific_validation?: boolean; blacklisted_chars?: string; host_blacklist?: string[]; host_whitelist?: string[]; } /** * defaults to * { * ignore_whitespace: false * } */ export interface IsEmptyOptions { ignore_whitespace: boolean; } export interface IsFloatOptions extends MinMaxExtendedOptions { locale?: AlphanumericLocale; } /** * defaults to * { * require_tld: true, * allow_underscores: false, * allow_trailing_dot: false, * allow_numeric_tld: false, * allow_wildcard: false, * ignore_max_length: false * } */ export interface IsFQDNOptions { require_tld?: boolean; allow_underscores?: boolean; allow_trailing_dot?: boolean; allow_numeric_tld?: boolean; allow_wildcard?: boolean; ignore_max_length?: boolean; } export interface IsIntOptions extends MinMaxExtendedOptions { allow_leading_zeroes?: boolean; } /** * defaults to * { * allow_primitives: false * } */ export interface IsJSONOptions { allow_primitives?: boolean; } /** * defaults to * { * checkDMS: false * } */ export interface IsLatLongOptions { checkDMS?: boolean; } /** * defaults to * { * allow_hyphens: false * } */ export interface IsIMEIOptions { allow_hyphens?: boolean; } /** * defaults to * { * strict: false, * strictSeparator: false * } */ export interface IsISO8601Options { strict?: boolean; strictSeparator?: boolean; } export interface IsISBNOptions { version?: '10' | '13'; } /** * defaults to * { * case_sensitive: false, * require_hyphen: false * } */ export interface IsISSNOptions { case_sensitive?: boolean; require_hyphen?: boolean; } /** * defaults to * ```js * { * no_separators: false * } * ``` */ export interface IsMACAddressOptions { no_separators?: boolean; /** * @deprecated use `no_separators` instead */ no_colons?: boolean; eui?: '48' | '64'; } export interface IsMobilePhoneOptions { strictMode?: boolean; } /** * defaults to * { * no_symbols: false * } */ export interface IsNumericOptions { no_symbols: boolean; locale?: AlphanumericLocale; } /** * defaults to * { * minLength: 8, * minLowercase: 1, * minUppercase: 1, * minNumbers: 1, * minSymbols: 1, * returnScore: false, * pointsPerUnique: 1, * pointsPerRepeat: 0.5, * pointsForContainingLower: 10, * pointsForContainingUpper: 10, * pointsForContainingNumber: 10, * pointsForContainingSymbol: 10 * } */ export interface IsStrongPasswordOptions { minLength?: number; minLowercase?: number; minUppercase?: number; minNumbers?: number; minSymbols?: number; returnScore?: boolean; pointsPerUnique?: number; pointsPerRepeat?: number; pointsForContainingLower?: number; pointsForContainingUpper?: number; pointsForContainingNumber?: number; pointsForContainingSymbol?: number; } /** * defaults to * { * protocols: ['http','https','ftp'], * require_tld: true, * require_protocol: false, * require_host: true, * require_port: false; * require_valid_protocol: true, * allow_underscores: false, * host_whitelist: false, * host_blacklist: false, * allow_trailing_dot: false, * allow_protocol_relative_urls: false, * validate_length: true, * allow_fragments: true, * allow_query_components: true * } */ export interface IsURLOptions { protocols?: URLProtocol[]; require_tld?: boolean; require_protocol?: boolean; require_host?: boolean; require_port?: boolean; require_valid_protocol?: boolean; allow_underscores?: boolean; host_whitelist?: (string | RegExp)[]; host_blacklist?: (string | RegExp)[]; allow_t
railing_dot?: boolean; allow_protocol_relative_urls?: boolean; disallow_auth?: boolean; validate_length?: boolean; allow_fragments?: boolean; allow_query_components?: boolean; } /** * defaults to * { * hourFormat: 'hour24', * mode: 'default', * }; */ export interface IsTimeOptions { hourFormat?: 'hour24' | 'hour12'; mode?: 'default' | 'withSeconds'; } export interface NormalizeEmailOptions { all_lowercase?: boolean; gmail_lowercase?: boolean; gmail_remove_dots?: boolean; gmail_remove_subaddress?: boolean; gmail_convert_googlemaildotcom?: boolean; outlookdotcom_lowercase?: boolean; outlookdotcom_remove_subaddress?: boolean; yahoo_lowercase?: boolean; yahoo_remove_subaddress?: boolean; icloud_lowercase?: boolean; icloud_remove_subaddress?: boolean; }
import { ContextItem } from './context-items'; import { Context, Optional } from './context'; import { Location } from './base'; export declare class ContextBuilder { private readonly stack; private fields; private locations; private message; private optional; private requestBail; setFields(fields: string[]): this; setLocations(locations: Location[]): this; setMessage(message: any): this; addItem(...items: ContextItem[]): this; setOptional(options: Optional): this; setRequestBail(): this; build(): Context; }
import { Request, ValidationError } from './base'; /** * Given a validation error, returns a new value that represents it. */ export declare type ErrorFormatter<T = any> = (error: ValidationError) => T; declare type ToArrayOptions = { /** * Whether only the first error of each field should be returned. * @default false */ onlyFirstError?: boolean; }; export declare type ResultFactory<T> = (req: Request) => Result<T>; interface ResultFactoryBuilderOptions<T = any> { /** * The default error formatter of every {@link Result} instance returned by * the custom `validationResult()` function. */ formatter: ErrorFormatter<T>; } /** * Extracts the validation errors of an express request */ export declare const validationResult: ResultFactory<ValidationError> & { withDefaults: typeof withDefaults; }; /** * The current state of the validation errors in a request. */ export declare class Result<T = any> { private formatter; private readonly errors; constructor(formatter: ErrorFormatter<T>, errors: readonly ValidationError[]); /** * Gets the validation errors as an array. * * @param options.onlyFirstError whether only the first error of each */ array(options?: ToArrayOptions): T[]; /** * Gets the validation errors as an object. * If a field has more than one error, only the first one is set in the resulting object. * * @returns an object from field name to error */ mapped(): Record<string, T>; /** * Specifies a function to format errors with. * @param formatter the function to use for formatting errors * @returns A new {@link Result} instance with the given formatter */ formatWith<T2>(formatter: ErrorFormatter<T2>): Result<T2>; /** * @returns `true` if there are no errors, `false` otherwise */ isEmpty(): boolean; /** * Throws an error if there are validation errors. */ throw(): void; } /** * Creates a `validationResult`-like function with default options passed to every {@link Result} it * returns. */ declare function withDefaults<T = any>(options?: Partial<ResultFactoryBuilderOptions<T>>): ResultFactory<T>; export {};
import { Location, Request } from './base'; export declare type MatchedDataOptions = { /** * Whether the value returned by `matchedData()` should include data deemed optional. * @default false */ includeOptionals: boolean; /** * An array of locations in the request to extract the data from. */ locations: Location[]; /** * Whether the value returned by `matchedData()` should include only values that have passed * validation. * @default true */ onlyValidData: boolean; }; /** * Extracts data validated or sanitized from the request, and builds an object with them. * * @param req the express request object * @param options * @returns an object of data that's been validated or sanitized in the passed request */ export declare function matchedData(req: Request, options?: Partial<MatchedDataOptions>): Record<string, any>;
import { Request } from './base'; import { ContextRunningOptions, ResultWithContext, ValidationChainLike } from './chain'; export declare const bindAll: <T>(object: T) => { [K in keyof T]: T[K]; }; export declare function toString(value: any): string; /** * Runs all validation chains, and returns their results. * * If one of them has a request-level bail set, the previous chains will be awaited on so that * results are not skewed, which can be slow. * If this same chain also contains errors, no further chains are run. */ export declare function runAllChains(req: Request, chains: readonly ValidationChainLike[], runOpts?: ContextRunningOptions): Promise<ResultWithContext[]>;
import { FieldInstance, FieldValidationError, Location, Meta, Request, UnknownFieldInstance, ValidationError } from './base'; import { ContextItem } from './context-items'; /** * Defines which kind of value makes a field optional. * * - `undefined`: only `undefined` values; equivalent to `value === undefined` * - `null`: only `undefined` and `null` values; equivalent to `value == null` * - `falsy`: all falsy values; equivalent to `!value` * - `false`: not optional. */ export declare type Optional = 'undefined' | 'null' | 'falsy' | false; declare type AddErrorOptions = { type: 'field'; message?: any; value: any; meta: Meta; } | { type: 'unknown_fields'; req: Request; message?: any; fields: UnknownFieldInstance[]; } | { type: 'alternative'; req: Request; message?: any; nestedErrors: FieldValidationError[]; } | { type: 'alternative_grouped'; req: Request; message?: any; nestedErrors: FieldValidationError[][]; }; export declare class Context { readonly fields: string[]; readonly locations: Location[]; readonly stack: ReadonlyArray<ContextItem>; readonly optional: Optional; readonly bail: boolean; readonly message?: any; private readonly _errors; get errors(): ReadonlyArray<ValidationError>; private readonly dataMap; constructor(fields: string[], locations: Location[], stack: ReadonlyArray<ContextItem>, optional: Optional, bail: boolean, message?: any); getData(options?: { requiredOnly: boolean; }): FieldInstance[]; addFieldInstances(instances: FieldInstance[]): void; setData(path: string, value: any, location: Location): void; addError(opts: AddErrorOptions): void; } export declare type ReadonlyContext = Pick<Context, Exclude<keyof Context, 'setData' | 'addFieldInstances' | 'addError'>>; export {};
import { FieldInstance, Location, Request, UnknownFieldInstance } from './base'; export declare type SelectFields = (req: Request, fields: string[], locations: Location[]) => FieldInstance[]; export declare const selectFields: SelectFields; export declare const selectUnknownFields: (req: Request, knownFields: string[], locations: Location[]) => UnknownFieldInstance[]; /** * Reconstructs a field path from a list of path segments. * * Most segments will be concatenated by a dot, for example `['foo', 'bar']` becomes `foo.bar`. * However, a numeric segment will be wrapped in brackets to match regular JS array syntax: * * ``` * reconstructFieldPath(['foo', 0, 'bar']) // foo[0].bar * ``` * * Segments which have a special character such as `.` will be wrapped in brackets and quotes, * which also matches JS syntax for objects with such keys. * * ``` * reconstructFieldPath(['foo', 'bar.baz', 'qux']) // foo["bar.baz"].qux * ``` */ export declare function reconstructFieldPath(segments: readonly string[]): string;
import { ReadonlyContext } from './context'; export interface Request { [k: string]: any; body?: any; cookies?: Record<string, any>; headers?: Record<string, any>; params?: Record<string, any>; query?: Record<string, any>; } export declare type Middleware = (req: Request, res: any, next: (err?: any) => void) => void; export declare type Location = 'body' | 'cookies' | 'headers' | 'params' | 'query'; /** * Metadata about a validated field. */ export declare type Meta = { /** * The express request from which the field was validated */ req: Request; /** * Which of the request objects the field was picked from */ location: Location; /** * The full path of the field within the request object. * * @example * const meta = { req, location: 'body', path: 'foo.bar' }; // req.body.foo.bar */ path: string; }; /** * A function which may * - return falsy values, a promise that rejects or throw to indicate that a field is invalid; * - return truthy values or a promise that resolves to indicate that a field is valid. * * @param input the field value * @param meta metadata about the field being validated */ export declare type CustomValidator = (input: any, meta: Meta) => any; export declare type StandardValidator = (input: string, ...options: any[]) => boolean; export declare type CustomSanitizer = (input: any, meta: Meta) => any; export declare type StandardSanitizer = (input: string, ...options: any[]) => any; export interface FieldInstance { path: string; originalPath: string; location: Location; value: any; } export declare type UnknownFieldInstance = Omit<FieldInstance, 'originalPath'>; export declare type FieldValidationError = { /** * Indicates that the error occurred because a field had an invalid value */ type: 'field'; /** * The location within the request where this field is */ location: Location; /** * The path to the field which has a validation error */ path: string; /** * The value of the field */ value: any; /** * The error message */ msg: any; }; export declare type UnknownFieldsError = { /** * Indicates that the error occurred because one or more fields are unknown in the request */ type: 'unknown_fields'; /** * The error message */ msg: any; /** * The list of fields that are unknown */ fields: UnknownFieldInstance[]; }; export declare type AlternativeValidationError = { /** * Indicates that the error occurred because all alternatives (e.g. in `oneOf()`) were invalid */ type: 'alternative'; /** * The error message */ msg: any; /** * The list of underlying validation errors returned by validation chains in `oneOf()` */ nestedErrors: FieldValidationError[]; }; export declare type GroupedAlternativeValidationError = { /** * Indicates that the error occurred because all alternatives (e.g. in `oneOf()`) were invalid, * and the nested errors are grouped per alternative. */ type: 'alternative_grouped'; /** * The error message */ msg: any; /** * The list of underlying validation errors returned by validation chains in `oneOf()` */ nestedErrors: FieldValidationError[][]; }; /** * A validation error as reported by a middleware. * The properties available in the error object vary according to the type. * * @example * if (error.type === 'alternative') { * console.log(`There are ${error.nestedErrors.length} errors under this alternative list`); * } else if (error.type === 'field') { * console.log(`There's an error with field ${error.path) in the request ${error.location}`); * } * */ export declare type ValidationError = AlternativeValidationError | GroupedAlternativeValidationError | UnknownFieldsError | FieldValidationError; /** * An error message
that's not a function, as these are treated as message factories * by all validation middlewares. */ export declare type ErrorMessage = string | number | symbol | boolean | object | any[]; /** * A function which creates an error message based on a field's value. * * @param input the field value * @param meta metadata about the field that was validated */ export declare type FieldMessageFactory = (value: any, meta: Meta) => any; /** * A function which creates an error message based on an alternative's nested errors. * * @see `oneOf()` * @param nestedErrors The errors from the invalid alternative(s). * @param opts */ export declare type AlternativeMessageFactory = (nestedErrors: FieldValidationError[], opts: { req: Request; }) => any; /** * A function which creates an error message based on a group of alternatives nested errors. * * @see `oneOf()` * @param nestedErrors The errors from the invalid alternative groups. * @param opts */ export declare type GroupedAlternativeMessageFactory = (nestedErrors: FieldValidationError[][], opts: { req: Request; }) => any; /** * A function which creates an error message based on unknown fields. * * @see `checkExact()` * @param unknownFields The unknown fields found in the request * @param opts */ export declare type UnknownFieldMessageFactory = (unknownFields: UnknownFieldInstance[], opts: { req: Request; }) => any; export declare const contextsKey = "express-validator#contexts"; export interface InternalRequest extends Request { [contextsKey]?: ReadonlyContext[]; } export declare class ValidationHalt extends Error { }
import { CustomSanitizer, CustomValidator, ErrorMessage, FieldMessageFactory, Location, Middleware, Request, ValidationError } from './base'; import { ContextRunner, ValidationChain } from './chain'; import { MatchedDataOptions } from './matched-data'; import { checkExact } from './middlewares/exact'; import { OneOfOptions } from './middlewares/one-of'; import { DefaultSchemaKeys, ExtensionSanitizerSchemaOptions, ExtensionValidatorSchemaOptions, ParamSchema, RunnableValidationChains } from './middlewares/schema'; import { ErrorFormatter, Result } from './validation-result'; declare type CustomValidatorsMap = Record<string, CustomValidator>; declare type CustomSanitizersMap = Record<string, CustomSanitizer>; declare type CustomOptions<E = ValidationError> = { errorFormatter?: ErrorFormatter<E>; }; /** * A validation chain that contains some extension validators/sanitizers. * * Built-in methods return the same chain type so that chaining using more of the extensions is * possible. * * @example * ``` * function createChain(chain: ValidationChainWithExtensions<'isAllowedDomain' | 'removeEmailAttribute'>) { * return chain * .isEmail() * .isAllowedDomain() * .trim() * .removeEmailAttribute(); * } * ``` */ export declare type ValidationChainWithExtensions<T extends string> = Middleware & { [K in keyof ValidationChain]: ValidationChain[K] extends (...args: infer A) => ValidationChain ? (...params: A) => ValidationChainWithExtensions<T> : ValidationChain[K]; } & { [K in T]: () => ValidationChainWithExtensions<T>; }; /** * Schema of validations/sanitizations for a field, including extension validators/sanitizers */ export declare type ParamSchemaWithExtensions<V extends string, S extends string, T extends string = DefaultSchemaKeys> = { [K in keyof ParamSchema<T> | V | S]?: K extends V ? ExtensionValidatorSchemaOptions : K extends S ? ExtensionSanitizerSchemaOptions : K extends keyof ParamSchema<T> ? ParamSchema<T>[K] : never; }; /** * Type of a validation chain created by a custom ExpressValidator instance. * * @example * ``` * const myExpressValidator = new ExpressValidator({ * isAllowedDomain: value => value.endsWith('@gmail.com') * }); * * type MyCustomValidationChain = CustomValidationChain<typeof myExpressValidator> * function createMyCustomChain(): MyCustomValidationChain { * return myExpressValidator.body('email').isAllowedDomain(); * } * ``` */ export declare type CustomValidationChain<T extends ExpressValidator<any, any, any>> = T extends ExpressValidator<infer V, infer S, any> ? ValidationChainWithExtensions<Extract<keyof V | keyof S, string>> : never; /** * Mapping from field name to a validations/sanitizations schema, including extensions from an * ExpressValidator instance. */ export declare type CustomSchema<T extends ExpressValidator<any, any, any>, K extends string = DefaultSchemaKeys> = T extends ExpressValidator<infer V, infer S, any> ? Record<string, ParamSchemaWithExtensions<Extract<keyof V, string>, Extract<keyof S, string>, K>> : never; export declare class ExpressValidator<V extends CustomValidatorsMap = {}, S extends CustomSanitizersMap = {}, E = ValidationError> { private readonly validators?; private readonly sanitizers?; private readonly options?; private readonly validatorEntries; private readonly sanitizerEntries; constructor(validators?: V | undefined, sanitizers?: S | undefined, options?: CustomOptions<E> | undefined); private createChain; buildCheckFunction(locations: Location[]): (fields?: string | string[], message?: FieldMessageFactory | ErrorMessage) => CustomValidationChain<this>; /** * Creates a middleware/validation chain for one or more fields that may be located in * any of the following: * * - `req.body` * - `req.cookies` * - `req.headers` * - `req.params` * - `req.query` * * @param fields a string or array of field names to validate/sanitize
* @param message an error message to use when failed validations don't specify a custom message. * Defaults to `Invalid Value`. */ readonly check: (fields?: string | string[] | undefined, message?: FieldMessageFactory | ErrorMessage | undefined) => CustomValidationChain<this>; /** * Same as {@link ExpressValidator.check}, but only validates in `req.body`. */ readonly body: (fields?: string | string[] | undefined, message?: FieldMessageFactory | ErrorMessage | undefined) => CustomValidationChain<this>; /** * Same as {@link ExpressValidator.check}, but only validates in `req.cookies`. */ readonly cookie: (fields?: string | string[] | undefined, message?: FieldMessageFactory | ErrorMessage | undefined) => CustomValidationChain<this>; /** * Same as {@link ExpressValidator.check}, but only validates in `req.headers`. */ readonly header: (fields?: string | string[] | undefined, message?: FieldMessageFactory | ErrorMessage | undefined) => CustomValidationChain<this>; /** * Same as {@link ExpressValidator.check}, but only validates in `req.params`. */ readonly param: (fields?: string | string[] | undefined, message?: FieldMessageFactory | ErrorMessage | undefined) => CustomValidationChain<this>; /** * Same as {@link ExpressValidator.check}, but only validates in `req.query`. */ readonly query: (fields?: string | string[] | undefined, message?: FieldMessageFactory | ErrorMessage | undefined) => CustomValidationChain<this>; /** * Checks whether the request contains exactly only those fields that have been validated. * * This method is here for convenience; it does exactly the same as `checkExact`. * * @see {@link checkExact} */ readonly checkExact: typeof checkExact; /** * Creates an express middleware with validations for multiple fields at once in the form of * a schema object. * * @param schema the schema to validate. * @param defaultLocations which locations to validate in each field. Defaults to every location. */ readonly checkSchema: <T extends string = DefaultSchemaKeys>(schema: CustomSchema<this, T>, locations?: Location[] | undefined) => RunnableValidationChains<CustomValidationChain<this>>; /** * Creates a middleware that will ensure that at least one of the given validation chains * or validation chain groups are valid. * * If none are, a single error of type `alternative` is added to the request, * with the errors of each chain made available under the `nestedErrors` property. * * @param chains an array of validation chains to check if are valid. * If any of the items of `chains` is an array of validation chains, then all of them * must be valid together for the request to be considered valid. */ oneOf(chains: (CustomValidationChain<this> | CustomValidationChain<this>[])[], options?: OneOfOptions): Middleware & ContextRunner; /** * Extracts the validation errors of an express request using the default error formatter of this * instance. * * @see {@link validationResult()} * @param req the express request object * @returns a `Result` which will by default use the error formatter passed when * instantiating `ExpressValidator`. */ readonly validationResult: (req: Request) => Result<E>; /** * Extracts data validated or sanitized from the request, and builds an object with them. * * This method is a shortcut for `matchedData`; it does nothing different than it. * * @see {@link matchedData} */ matchedData(req: Request, options?: Partial<MatchedDataOptions>): Record<string, any>; } export {};
export { Location, Meta, CustomValidator, CustomSanitizer, AlternativeMessageFactory, FieldMessageFactory, GroupedAlternativeMessageFactory, UnknownFieldMessageFactory, FieldValidationError, AlternativeValidationError, GroupedAlternativeValidationError, UnknownFieldsError, ValidationError, } from './base'; export { ContextRunner, ValidationChain } from './chain'; export * from './middlewares/exact'; export * from './middlewares/one-of'; export * from './middlewares/validation-chain-builders'; export { checkSchema, Schema, ParamSchema } from './middlewares/schema'; export * from './matched-data'; export * from './validation-result'; export * from './express-validator';