diff --git a/src/deprecatedCompat/4.0/nodeFactoryTopLevelExports.ts b/src/deprecatedCompat/4.0/nodeFactoryTopLevelExports.ts deleted file mode 100644 index 5b8efa63562..00000000000 --- a/src/deprecatedCompat/4.0/nodeFactoryTopLevelExports.ts +++ /dev/null @@ -1,1371 +0,0 @@ -import { - ArrowFunction, - AsteriskToken, - BinaryExpression, - BinaryOperator, - BinaryOperatorToken, - BindingName, - BooleanLiteral, - ClassElement, - ClassExpression, - ColonToken, - ConciseBody, - ConditionalExpression, - ConstructorTypeNode, - Debug, - Decorator, - DeprecationOptions, - EntityName, - EqualsGreaterThanToken, - ExclamationToken, - ExportDeclaration, - Expression, - ExpressionWithTypeArguments, - factory, - GeneratedIdentifierFlags, - HeritageClause, - Identifier, - ImportClause, - IndexSignatureDeclaration, - isNodeKind, - JSDocParameterTag, - JSDocTypeExpression, - MethodSignature, - Modifier, - Mutable, - NamedExportBindings, - NamedImportBindings, - Node, - NodeArray, - NoSubstitutionTemplateLiteral, - NumericLiteral, - ParameterDeclaration, - parseBaseNodeFactory, - PostfixUnaryExpression, - PrefixUnaryExpression, - PrimaryExpression, - PropertyName, - PropertySignature, - PseudoBigInt, - QuestionToken, - setParent, - setTextRange, - setTextRangePosEnd, - StringLiteral, - SyntaxKind, - TaggedTemplateExpression, - TemplateLiteral, - ThisTypeNode, - Token, - TypeNode, - TypeOperatorNode, - TypeParameterDeclaration, - TypePredicateNode, - VariableDeclaration, - YieldExpression, -} from "../_namespaces/ts"; -import { deprecate } from "../deprecate"; - -// DEPRECATION: Node factory top-level exports -// DEPRECATION PLAN: -// - soft: 4.0 -// - warn: 4.1 -// - error: 5.0 -// NOTE: These exports are deprecated in favor of using a `NodeFactory` instance and exist here purely for backwards compatibility reasons. -const factoryDeprecation: DeprecationOptions = { since: "4.0", warnAfter: "4.1", message: "Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead." }; - -/** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */ -export const createNodeArray: typeof factory.createNodeArray = deprecate(factory.createNodeArray, factoryDeprecation); - -/** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */ -export const createNumericLiteral: typeof factory.createNumericLiteral = deprecate(factory.createNumericLiteral, factoryDeprecation); - -/** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */ -export const createBigIntLiteral: typeof factory.createBigIntLiteral = deprecate(factory.createBigIntLiteral, factoryDeprecation); - -/** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */ -export const createStringLiteral: typeof factory.createStringLiteral = deprecate(factory.createStringLiteral, factoryDeprecation); - -/** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ -export const createStringLiteralFromNode: typeof factory.createStringLiteralFromNode = deprecate(factory.createStringLiteralFromNode, factoryDeprecation); - -/** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ -export const createRegularExpressionLiteral: typeof factory.createRegularExpressionLiteral = deprecate(factory.createRegularExpressionLiteral, factoryDeprecation); - -/** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ -export const createLoopVariable: typeof factory.createLoopVariable = deprecate(factory.createLoopVariable, factoryDeprecation); - -/** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */ -export const createUniqueName: typeof factory.createUniqueName = deprecate(factory.createUniqueName, factoryDeprecation); - -/** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */ -export const createPrivateIdentifier: typeof factory.createPrivateIdentifier = deprecate(factory.createPrivateIdentifier, factoryDeprecation); - -/** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */ -export const createSuper: typeof factory.createSuper = deprecate(factory.createSuper, factoryDeprecation); - -/** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */ -export const createThis: typeof factory.createThis = deprecate(factory.createThis, factoryDeprecation); - -/** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */ -export const createNull: typeof factory.createNull = deprecate(factory.createNull, factoryDeprecation); - -/** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */ -export const createTrue: typeof factory.createTrue = deprecate(factory.createTrue, factoryDeprecation); - -/** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */ -export const createFalse: typeof factory.createFalse = deprecate(factory.createFalse, factoryDeprecation); - -/** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ -export const createModifier: typeof factory.createModifier = deprecate(factory.createModifier, factoryDeprecation); - -/** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ -export const createModifiersFromModifierFlags: typeof factory.createModifiersFromModifierFlags = deprecate(factory.createModifiersFromModifierFlags, factoryDeprecation); - -/** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ -export const createQualifiedName: typeof factory.createQualifiedName = deprecate(factory.createQualifiedName, factoryDeprecation); - -/** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ -export const updateQualifiedName: typeof factory.updateQualifiedName = deprecate(factory.updateQualifiedName, factoryDeprecation); - -/** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */ -export const createComputedPropertyName: typeof factory.createComputedPropertyName = deprecate(factory.createComputedPropertyName, factoryDeprecation); - -/** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ -export const updateComputedPropertyName: typeof factory.updateComputedPropertyName = deprecate(factory.updateComputedPropertyName, factoryDeprecation); - -/** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ -export const createTypeParameterDeclaration: typeof factory.createTypeParameterDeclaration = deprecate(factory.createTypeParameterDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ -export const updateTypeParameterDeclaration: typeof factory.updateTypeParameterDeclaration = deprecate(factory.updateTypeParameterDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ -export const createParameter: typeof factory.createParameterDeclaration = deprecate(factory.createParameterDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ -export const updateParameter: typeof factory.updateParameterDeclaration = deprecate(factory.updateParameterDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ -export const createDecorator: typeof factory.createDecorator = deprecate(factory.createDecorator, factoryDeprecation); - -/** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ -export const updateDecorator: typeof factory.updateDecorator = deprecate(factory.updateDecorator, factoryDeprecation); - -/** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ -export const createProperty: typeof factory.createPropertyDeclaration = deprecate(factory.createPropertyDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ -export const updateProperty: typeof factory.updatePropertyDeclaration = deprecate(factory.updatePropertyDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ -export const createMethod: typeof factory.createMethodDeclaration = deprecate(factory.createMethodDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ -export const updateMethod: typeof factory.updateMethodDeclaration = deprecate(factory.updateMethodDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ -export const createConstructor: typeof factory.createConstructorDeclaration = deprecate(factory.createConstructorDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ -export const updateConstructor: typeof factory.updateConstructorDeclaration = deprecate(factory.updateConstructorDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ -export const createGetAccessor: typeof factory.createGetAccessorDeclaration = deprecate(factory.createGetAccessorDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ -export const updateGetAccessor: typeof factory.updateGetAccessorDeclaration = deprecate(factory.updateGetAccessorDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ -export const createSetAccessor: typeof factory.createSetAccessorDeclaration = deprecate(factory.createSetAccessorDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ -export const updateSetAccessor: typeof factory.updateSetAccessorDeclaration = deprecate(factory.updateSetAccessorDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ -export const createCallSignature: typeof factory.createCallSignature = deprecate(factory.createCallSignature, factoryDeprecation); - -/** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */ -export const updateCallSignature: typeof factory.updateCallSignature = deprecate(factory.updateCallSignature, factoryDeprecation); - -/** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */ -export const createConstructSignature: typeof factory.createConstructSignature = deprecate(factory.createConstructSignature, factoryDeprecation); - -/** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */ -export const updateConstructSignature: typeof factory.updateConstructSignature = deprecate(factory.updateConstructSignature, factoryDeprecation); - -/** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */ -export const updateIndexSignature: typeof factory.updateIndexSignature = deprecate(factory.updateIndexSignature, factoryDeprecation); - -/** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */ -export const createKeywordTypeNode: typeof factory.createKeywordTypeNode = deprecate(factory.createKeywordTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ -export const createTypePredicateNodeWithModifier: typeof factory.createTypePredicateNode = deprecate(factory.createTypePredicateNode, factoryDeprecation); - -/** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ -export const updateTypePredicateNodeWithModifier: typeof factory.updateTypePredicateNode = deprecate(factory.updateTypePredicateNode, factoryDeprecation); - -/** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ -export const createTypeReferenceNode: typeof factory.createTypeReferenceNode = deprecate(factory.createTypeReferenceNode, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ -export const updateTypeReferenceNode: typeof factory.updateTypeReferenceNode = deprecate(factory.updateTypeReferenceNode, factoryDeprecation); - -/** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ -export const createFunctionTypeNode: typeof factory.createFunctionTypeNode = deprecate(factory.createFunctionTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */ -export const updateFunctionTypeNode: typeof factory.updateFunctionTypeNode = deprecate(factory.updateFunctionTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */ -export const createConstructorTypeNode = deprecate(( - typeParameters: readonly TypeParameterDeclaration[] | undefined, - parameters: readonly ParameterDeclaration[], - type: TypeNode -) => { - return factory.createConstructorTypeNode(/*modifiers*/ undefined, typeParameters, parameters, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ -export const updateConstructorTypeNode = deprecate(( - node: ConstructorTypeNode, - typeParameters: NodeArray | undefined, - parameters: NodeArray, - type: TypeNode -) => { - return factory.updateConstructorTypeNode(node, node.modifiers, typeParameters, parameters, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ -export const createTypeQueryNode: typeof factory.createTypeQueryNode = deprecate(factory.createTypeQueryNode, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ -export const updateTypeQueryNode: typeof factory.updateTypeQueryNode = deprecate(factory.updateTypeQueryNode, factoryDeprecation); - -/** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ -export const createTypeLiteralNode: typeof factory.createTypeLiteralNode = deprecate(factory.createTypeLiteralNode, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ -export const updateTypeLiteralNode: typeof factory.updateTypeLiteralNode = deprecate(factory.updateTypeLiteralNode, factoryDeprecation); - -/** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */ -export const createArrayTypeNode: typeof factory.createArrayTypeNode = deprecate(factory.createArrayTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */ -export const updateArrayTypeNode: typeof factory.updateArrayTypeNode = deprecate(factory.updateArrayTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */ -export const createTupleTypeNode: typeof factory.createTupleTypeNode = deprecate(factory.createTupleTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */ -export const updateTupleTypeNode: typeof factory.updateTupleTypeNode = deprecate(factory.updateTupleTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */ -export const createOptionalTypeNode: typeof factory.createOptionalTypeNode = deprecate(factory.createOptionalTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */ -export const updateOptionalTypeNode: typeof factory.updateOptionalTypeNode = deprecate(factory.updateOptionalTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */ -export const createRestTypeNode: typeof factory.createRestTypeNode = deprecate(factory.createRestTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */ -export const updateRestTypeNode: typeof factory.updateRestTypeNode = deprecate(factory.updateRestTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */ -export const createUnionTypeNode: typeof factory.createUnionTypeNode = deprecate(factory.createUnionTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */ -export const updateUnionTypeNode: typeof factory.updateUnionTypeNode = deprecate(factory.updateUnionTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */ -export const createIntersectionTypeNode: typeof factory.createIntersectionTypeNode = deprecate(factory.createIntersectionTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */ -export const updateIntersectionTypeNode: typeof factory.updateIntersectionTypeNode = deprecate(factory.updateIntersectionTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */ -export const createConditionalTypeNode: typeof factory.createConditionalTypeNode = deprecate(factory.createConditionalTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */ -export const updateConditionalTypeNode: typeof factory.updateConditionalTypeNode = deprecate(factory.updateConditionalTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */ -export const createInferTypeNode: typeof factory.createInferTypeNode = deprecate(factory.createInferTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ -export const updateInferTypeNode: typeof factory.updateInferTypeNode = deprecate(factory.updateInferTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ -export const createImportTypeNode: typeof factory.createImportTypeNode = deprecate(factory.createImportTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ -export const updateImportTypeNode: typeof factory.updateImportTypeNode = deprecate(factory.updateImportTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ -export const createParenthesizedType: typeof factory.createParenthesizedType = deprecate(factory.createParenthesizedType, factoryDeprecation); - -/** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ -export const updateParenthesizedType: typeof factory.updateParenthesizedType = deprecate(factory.updateParenthesizedType, factoryDeprecation); - -/** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */ -export const createThisTypeNode: typeof factory.createThisTypeNode = deprecate(factory.createThisTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */ -export const updateTypeOperatorNode: typeof factory.updateTypeOperatorNode = deprecate(factory.updateTypeOperatorNode, factoryDeprecation); - -/** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ -export const createIndexedAccessTypeNode: typeof factory.createIndexedAccessTypeNode = deprecate(factory.createIndexedAccessTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ -export const updateIndexedAccessTypeNode: typeof factory.updateIndexedAccessTypeNode = deprecate(factory.updateIndexedAccessTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ -export const createMappedTypeNode: typeof factory.createMappedTypeNode = deprecate(factory.createMappedTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ -export const updateMappedTypeNode: typeof factory.updateMappedTypeNode = deprecate(factory.updateMappedTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ -export const createLiteralTypeNode: typeof factory.createLiteralTypeNode = deprecate(factory.createLiteralTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ -export const updateLiteralTypeNode: typeof factory.updateLiteralTypeNode = deprecate(factory.updateLiteralTypeNode, factoryDeprecation); - -/** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ -export const createObjectBindingPattern: typeof factory.createObjectBindingPattern = deprecate(factory.createObjectBindingPattern, factoryDeprecation); - -/** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ -export const updateObjectBindingPattern: typeof factory.updateObjectBindingPattern = deprecate(factory.updateObjectBindingPattern, factoryDeprecation); - -/** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */ -export const createArrayBindingPattern: typeof factory.createArrayBindingPattern = deprecate(factory.createArrayBindingPattern, factoryDeprecation); - -/** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ -export const updateArrayBindingPattern: typeof factory.updateArrayBindingPattern = deprecate(factory.updateArrayBindingPattern, factoryDeprecation); - -/** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ -export const createBindingElement: typeof factory.createBindingElement = deprecate(factory.createBindingElement, factoryDeprecation); - -/** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ -export const updateBindingElement: typeof factory.updateBindingElement = deprecate(factory.updateBindingElement, factoryDeprecation); - -/** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */ -export const createArrayLiteral: typeof factory.createArrayLiteralExpression = deprecate(factory.createArrayLiteralExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */ -export const updateArrayLiteral: typeof factory.updateArrayLiteralExpression = deprecate(factory.updateArrayLiteralExpression, factoryDeprecation); - -/** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */ -export const createObjectLiteral: typeof factory.createObjectLiteralExpression = deprecate(factory.createObjectLiteralExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */ -export const updateObjectLiteral: typeof factory.updateObjectLiteralExpression = deprecate(factory.updateObjectLiteralExpression, factoryDeprecation); - -/** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */ -export const createPropertyAccess: typeof factory.createPropertyAccessExpression = deprecate(factory.createPropertyAccessExpression, factoryDeprecation); - -/** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */ -export const updatePropertyAccess: typeof factory.updatePropertyAccessExpression = deprecate(factory.updatePropertyAccessExpression, factoryDeprecation); - -/** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ -export const createPropertyAccessChain: typeof factory.createPropertyAccessChain = deprecate(factory.createPropertyAccessChain, factoryDeprecation); - -/** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ -export const updatePropertyAccessChain: typeof factory.updatePropertyAccessChain = deprecate(factory.updatePropertyAccessChain, factoryDeprecation); - -/** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */ -export const createElementAccess: typeof factory.createElementAccessExpression = deprecate(factory.createElementAccessExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */ -export const updateElementAccess: typeof factory.updateElementAccessExpression = deprecate(factory.updateElementAccessExpression, factoryDeprecation); - -/** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ -export const createElementAccessChain: typeof factory.createElementAccessChain = deprecate(factory.createElementAccessChain, factoryDeprecation); - -/** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ -export const updateElementAccessChain: typeof factory.updateElementAccessChain = deprecate(factory.updateElementAccessChain, factoryDeprecation); - -/** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */ -export const createCall: typeof factory.createCallExpression = deprecate(factory.createCallExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */ -export const updateCall: typeof factory.updateCallExpression = deprecate(factory.updateCallExpression, factoryDeprecation); - -/** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ -export const createCallChain: typeof factory.createCallChain = deprecate(factory.createCallChain, factoryDeprecation); - -/** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ -export const updateCallChain: typeof factory.updateCallChain = deprecate(factory.updateCallChain, factoryDeprecation); - -/** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */ -export const createNew: typeof factory.createNewExpression = deprecate(factory.createNewExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */ -export const updateNew: typeof factory.updateNewExpression = deprecate(factory.updateNewExpression, factoryDeprecation); - -/** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ -export const createTypeAssertion: typeof factory.createTypeAssertion = deprecate(factory.createTypeAssertion, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ -export const updateTypeAssertion: typeof factory.updateTypeAssertion = deprecate(factory.updateTypeAssertion, factoryDeprecation); - -/** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */ -export const createParen: typeof factory.createParenthesizedExpression = deprecate(factory.createParenthesizedExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */ -export const updateParen: typeof factory.updateParenthesizedExpression = deprecate(factory.updateParenthesizedExpression, factoryDeprecation); - -/** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ -export const createFunctionExpression: typeof factory.createFunctionExpression = deprecate(factory.createFunctionExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ -export const updateFunctionExpression: typeof factory.updateFunctionExpression = deprecate(factory.updateFunctionExpression, factoryDeprecation); - -/** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */ -export const createDelete: typeof factory.createDeleteExpression = deprecate(factory.createDeleteExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */ -export const updateDelete: typeof factory.updateDeleteExpression = deprecate(factory.updateDeleteExpression, factoryDeprecation); - -/** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */ -export const createTypeOf: typeof factory.createTypeOfExpression = deprecate(factory.createTypeOfExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */ -export const updateTypeOf: typeof factory.updateTypeOfExpression = deprecate(factory.updateTypeOfExpression, factoryDeprecation); - -/** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */ -export const createVoid: typeof factory.createVoidExpression = deprecate(factory.createVoidExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */ -export const updateVoid: typeof factory.updateVoidExpression = deprecate(factory.updateVoidExpression, factoryDeprecation); - -/** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */ -export const createAwait: typeof factory.createAwaitExpression = deprecate(factory.createAwaitExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */ -export const updateAwait: typeof factory.updateAwaitExpression = deprecate(factory.updateAwaitExpression, factoryDeprecation); - -/** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */ -export const createPrefix: typeof factory.createPrefixUnaryExpression = deprecate(factory.createPrefixUnaryExpression, factoryDeprecation); - -/** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */ -export const updatePrefix: typeof factory.updatePrefixUnaryExpression = deprecate(factory.updatePrefixUnaryExpression, factoryDeprecation); - -/** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */ -export const createPostfix: typeof factory.createPostfixUnaryExpression = deprecate(factory.createPostfixUnaryExpression, factoryDeprecation); - -/** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */ -export const updatePostfix: typeof factory.updatePostfixUnaryExpression = deprecate(factory.updatePostfixUnaryExpression, factoryDeprecation); - -/** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */ -export const createBinary: typeof factory.createBinaryExpression = deprecate(factory.createBinaryExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */ -export const updateConditional: typeof factory.updateConditionalExpression = deprecate(factory.updateConditionalExpression, factoryDeprecation); - -/** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ -export const createTemplateExpression: typeof factory.createTemplateExpression = deprecate(factory.createTemplateExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */ -export const updateTemplateExpression: typeof factory.updateTemplateExpression = deprecate(factory.updateTemplateExpression, factoryDeprecation); - -/** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */ -export const createTemplateHead: typeof factory.createTemplateHead = deprecate(factory.createTemplateHead, factoryDeprecation); - -/** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */ -export const createTemplateMiddle: typeof factory.createTemplateMiddle = deprecate(factory.createTemplateMiddle, factoryDeprecation); - -/** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */ -export const createTemplateTail: typeof factory.createTemplateTail = deprecate(factory.createTemplateTail, factoryDeprecation); - -/** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */ -export const createNoSubstitutionTemplateLiteral: typeof factory.createNoSubstitutionTemplateLiteral = deprecate(factory.createNoSubstitutionTemplateLiteral, factoryDeprecation); - -/** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */ -export const updateYield: typeof factory.updateYieldExpression = deprecate(factory.updateYieldExpression, factoryDeprecation); - -/** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */ -export const createSpread: typeof factory.createSpreadElement = deprecate(factory.createSpreadElement, factoryDeprecation); - -/** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */ -export const updateSpread: typeof factory.updateSpreadElement = deprecate(factory.updateSpreadElement, factoryDeprecation); - -/** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ -export const createOmittedExpression: typeof factory.createOmittedExpression = deprecate(factory.createOmittedExpression, factoryDeprecation); - -/** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */ -export const createAsExpression: typeof factory.createAsExpression = deprecate(factory.createAsExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */ -export const updateAsExpression: typeof factory.updateAsExpression = deprecate(factory.updateAsExpression, factoryDeprecation); - -/** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */ -export const createNonNullExpression: typeof factory.createNonNullExpression = deprecate(factory.createNonNullExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */ -export const updateNonNullExpression: typeof factory.updateNonNullExpression = deprecate(factory.updateNonNullExpression, factoryDeprecation); - -/** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */ -export const createNonNullChain: typeof factory.createNonNullChain = deprecate(factory.createNonNullChain, factoryDeprecation); - -/** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */ -export const updateNonNullChain: typeof factory.updateNonNullChain = deprecate(factory.updateNonNullChain, factoryDeprecation); - -/** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */ -export const createMetaProperty: typeof factory.createMetaProperty = deprecate(factory.createMetaProperty, factoryDeprecation); - -/** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */ -export const updateMetaProperty: typeof factory.updateMetaProperty = deprecate(factory.updateMetaProperty, factoryDeprecation); - -/** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */ -export const createTemplateSpan: typeof factory.createTemplateSpan = deprecate(factory.createTemplateSpan, factoryDeprecation); - -/** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */ -export const updateTemplateSpan: typeof factory.updateTemplateSpan = deprecate(factory.updateTemplateSpan, factoryDeprecation); - -/** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */ -export const createSemicolonClassElement: typeof factory.createSemicolonClassElement = deprecate(factory.createSemicolonClassElement, factoryDeprecation); - -/** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */ -export const createBlock: typeof factory.createBlock = deprecate(factory.createBlock, factoryDeprecation); - -/** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */ -export const updateBlock: typeof factory.updateBlock = deprecate(factory.updateBlock, factoryDeprecation); - -/** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */ -export const createVariableStatement: typeof factory.createVariableStatement = deprecate(factory.createVariableStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */ -export const updateVariableStatement: typeof factory.updateVariableStatement = deprecate(factory.updateVariableStatement, factoryDeprecation); - -/** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */ -export const createEmptyStatement: typeof factory.createEmptyStatement = deprecate(factory.createEmptyStatement, factoryDeprecation); - -/** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ -export const createExpressionStatement: typeof factory.createExpressionStatement = deprecate(factory.createExpressionStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ -export const updateExpressionStatement: typeof factory.updateExpressionStatement = deprecate(factory.updateExpressionStatement, factoryDeprecation); - -/** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ -export const createStatement: typeof factory.createExpressionStatement = deprecate(factory.createExpressionStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ -export const updateStatement: typeof factory.updateExpressionStatement = deprecate(factory.updateExpressionStatement, factoryDeprecation); - -/** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */ -export const createIf: typeof factory.createIfStatement = deprecate(factory.createIfStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */ -export const updateIf: typeof factory.updateIfStatement = deprecate(factory.updateIfStatement, factoryDeprecation); - -/** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */ -export const createDo: typeof factory.createDoStatement = deprecate(factory.createDoStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */ -export const updateDo: typeof factory.updateDoStatement = deprecate(factory.updateDoStatement, factoryDeprecation); - -/** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */ -export const createWhile: typeof factory.createWhileStatement = deprecate(factory.createWhileStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */ -export const updateWhile: typeof factory.updateWhileStatement = deprecate(factory.updateWhileStatement, factoryDeprecation); - -/** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */ -export const createFor: typeof factory.createForStatement = deprecate(factory.createForStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */ -export const updateFor: typeof factory.updateForStatement = deprecate(factory.updateForStatement, factoryDeprecation); - -/** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */ -export const createForIn: typeof factory.createForInStatement = deprecate(factory.createForInStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */ -export const updateForIn: typeof factory.updateForInStatement = deprecate(factory.updateForInStatement, factoryDeprecation); - -/** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */ -export const createForOf: typeof factory.createForOfStatement = deprecate(factory.createForOfStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */ -export const updateForOf: typeof factory.updateForOfStatement = deprecate(factory.updateForOfStatement, factoryDeprecation); - -/** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */ -export const createContinue: typeof factory.createContinueStatement = deprecate(factory.createContinueStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */ -export const updateContinue: typeof factory.updateContinueStatement = deprecate(factory.updateContinueStatement, factoryDeprecation); - -/** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */ -export const createBreak: typeof factory.createBreakStatement = deprecate(factory.createBreakStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */ -export const updateBreak: typeof factory.updateBreakStatement = deprecate(factory.updateBreakStatement, factoryDeprecation); - -/** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */ -export const createReturn: typeof factory.createReturnStatement = deprecate(factory.createReturnStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */ -export const updateReturn: typeof factory.updateReturnStatement = deprecate(factory.updateReturnStatement, factoryDeprecation); - -/** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */ -export const createWith: typeof factory.createWithStatement = deprecate(factory.createWithStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */ -export const updateWith: typeof factory.updateWithStatement = deprecate(factory.updateWithStatement, factoryDeprecation); - -/** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */ -export const createSwitch: typeof factory.createSwitchStatement = deprecate(factory.createSwitchStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */ -export const updateSwitch: typeof factory.updateSwitchStatement = deprecate(factory.updateSwitchStatement, factoryDeprecation); - -/** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */ -export const createLabel: typeof factory.createLabeledStatement = deprecate(factory.createLabeledStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */ -export const updateLabel: typeof factory.updateLabeledStatement = deprecate(factory.updateLabeledStatement, factoryDeprecation); - -/** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */ -export const createThrow: typeof factory.createThrowStatement = deprecate(factory.createThrowStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */ -export const updateThrow: typeof factory.updateThrowStatement = deprecate(factory.updateThrowStatement, factoryDeprecation); - -/** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */ -export const createTry: typeof factory.createTryStatement = deprecate(factory.createTryStatement, factoryDeprecation); - -/** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */ -export const updateTry: typeof factory.updateTryStatement = deprecate(factory.updateTryStatement, factoryDeprecation); - -/** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ -export const createDebuggerStatement: typeof factory.createDebuggerStatement = deprecate(factory.createDebuggerStatement, factoryDeprecation); - -/** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */ -export const createVariableDeclarationList: typeof factory.createVariableDeclarationList = deprecate(factory.createVariableDeclarationList, factoryDeprecation); - -/** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */ -export const updateVariableDeclarationList: typeof factory.updateVariableDeclarationList = deprecate(factory.updateVariableDeclarationList, factoryDeprecation); - -/** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */ -export const createFunctionDeclaration: typeof factory.createFunctionDeclaration = deprecate(factory.createFunctionDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */ -export const updateFunctionDeclaration: typeof factory.updateFunctionDeclaration = deprecate(factory.updateFunctionDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */ -export const createClassDeclaration: typeof factory.createClassDeclaration = deprecate(factory.createClassDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */ -export const updateClassDeclaration: typeof factory.updateClassDeclaration = deprecate(factory.updateClassDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */ -export const createInterfaceDeclaration: typeof factory.createInterfaceDeclaration = deprecate(factory.createInterfaceDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */ -export const updateInterfaceDeclaration: typeof factory.updateInterfaceDeclaration = deprecate(factory.updateInterfaceDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ -export const createTypeAliasDeclaration: typeof factory.createTypeAliasDeclaration = deprecate(factory.createTypeAliasDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ -export const updateTypeAliasDeclaration: typeof factory.updateTypeAliasDeclaration = deprecate(factory.updateTypeAliasDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */ -export const createEnumDeclaration: typeof factory.createEnumDeclaration = deprecate(factory.createEnumDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ -export const updateEnumDeclaration: typeof factory.updateEnumDeclaration = deprecate(factory.updateEnumDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ -export const createModuleDeclaration: typeof factory.createModuleDeclaration = deprecate(factory.createModuleDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ -export const updateModuleDeclaration: typeof factory.updateModuleDeclaration = deprecate(factory.updateModuleDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ -export const createModuleBlock: typeof factory.createModuleBlock = deprecate(factory.createModuleBlock, factoryDeprecation); - -/** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ -export const updateModuleBlock: typeof factory.updateModuleBlock = deprecate(factory.updateModuleBlock, factoryDeprecation); - -/** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */ -export const createCaseBlock: typeof factory.createCaseBlock = deprecate(factory.createCaseBlock, factoryDeprecation); - -/** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */ -export const updateCaseBlock: typeof factory.updateCaseBlock = deprecate(factory.updateCaseBlock, factoryDeprecation); - -/** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ -export const createNamespaceExportDeclaration: typeof factory.createNamespaceExportDeclaration = deprecate(factory.createNamespaceExportDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ -export const updateNamespaceExportDeclaration: typeof factory.updateNamespaceExportDeclaration = deprecate(factory.updateNamespaceExportDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ -export const createImportEqualsDeclaration: typeof factory.createImportEqualsDeclaration = deprecate(factory.createImportEqualsDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ -export const updateImportEqualsDeclaration: typeof factory.updateImportEqualsDeclaration = deprecate(factory.updateImportEqualsDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ -export const createImportDeclaration: typeof factory.createImportDeclaration = deprecate(factory.createImportDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ -export const updateImportDeclaration: typeof factory.updateImportDeclaration = deprecate(factory.updateImportDeclaration, factoryDeprecation); - -/** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */ -export const createNamespaceImport: typeof factory.createNamespaceImport = deprecate(factory.createNamespaceImport, factoryDeprecation); - -/** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */ -export const updateNamespaceImport: typeof factory.updateNamespaceImport = deprecate(factory.updateNamespaceImport, factoryDeprecation); - -/** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */ -export const createNamedImports: typeof factory.createNamedImports = deprecate(factory.createNamedImports, factoryDeprecation); - -/** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */ -export const updateNamedImports: typeof factory.updateNamedImports = deprecate(factory.updateNamedImports, factoryDeprecation); - -/** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */ -export const createImportSpecifier: typeof factory.createImportSpecifier = deprecate(factory.createImportSpecifier, factoryDeprecation); - -/** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */ -export const updateImportSpecifier: typeof factory.updateImportSpecifier = deprecate(factory.updateImportSpecifier, factoryDeprecation); - -/** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */ -export const createExportAssignment: typeof factory.createExportAssignment = deprecate(factory.createExportAssignment, factoryDeprecation); - -/** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */ -export const updateExportAssignment: typeof factory.updateExportAssignment = deprecate(factory.updateExportAssignment, factoryDeprecation); - -/** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */ -export const createNamedExports: typeof factory.createNamedExports = deprecate(factory.createNamedExports, factoryDeprecation); - -/** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */ -export const updateNamedExports: typeof factory.updateNamedExports = deprecate(factory.updateNamedExports, factoryDeprecation); - -/** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */ -export const createExportSpecifier: typeof factory.createExportSpecifier = deprecate(factory.createExportSpecifier, factoryDeprecation); - -/** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */ -export const updateExportSpecifier: typeof factory.updateExportSpecifier = deprecate(factory.updateExportSpecifier, factoryDeprecation); - -/** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */ -export const createExternalModuleReference: typeof factory.createExternalModuleReference = deprecate(factory.createExternalModuleReference, factoryDeprecation); - -/** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */ -export const updateExternalModuleReference: typeof factory.updateExternalModuleReference = deprecate(factory.updateExternalModuleReference, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */ -export const createJSDocTypeExpression: typeof factory.createJSDocTypeExpression = deprecate(factory.createJSDocTypeExpression, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */ -export const createJSDocTypeTag: typeof factory.createJSDocTypeTag = deprecate(factory.createJSDocTypeTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ -export const createJSDocReturnTag: typeof factory.createJSDocReturnTag = deprecate(factory.createJSDocReturnTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ -export const createJSDocThisTag: typeof factory.createJSDocThisTag = deprecate(factory.createJSDocThisTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ -export const createJSDocComment: typeof factory.createJSDocComment = deprecate(factory.createJSDocComment, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ -export const createJSDocParameterTag: typeof factory.createJSDocParameterTag = deprecate(factory.createJSDocParameterTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */ -export const createJSDocClassTag: typeof factory.createJSDocClassTag = deprecate(factory.createJSDocClassTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */ -export const createJSDocAugmentsTag: typeof factory.createJSDocAugmentsTag = deprecate(factory.createJSDocAugmentsTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ -export const createJSDocEnumTag: typeof factory.createJSDocEnumTag = deprecate(factory.createJSDocEnumTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ -export const createJSDocTemplateTag: typeof factory.createJSDocTemplateTag = deprecate(factory.createJSDocTemplateTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ -export const createJSDocTypedefTag: typeof factory.createJSDocTypedefTag = deprecate(factory.createJSDocTypedefTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */ -export const createJSDocCallbackTag: typeof factory.createJSDocCallbackTag = deprecate(factory.createJSDocCallbackTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */ -export const createJSDocSignature: typeof factory.createJSDocSignature = deprecate(factory.createJSDocSignature, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */ -export const createJSDocPropertyTag: typeof factory.createJSDocPropertyTag = deprecate(factory.createJSDocPropertyTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */ -export const createJSDocTypeLiteral: typeof factory.createJSDocTypeLiteral = deprecate(factory.createJSDocTypeLiteral, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */ -export const createJSDocImplementsTag: typeof factory.createJSDocImplementsTag = deprecate(factory.createJSDocImplementsTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */ -export const createJSDocAuthorTag: typeof factory.createJSDocAuthorTag = deprecate(factory.createJSDocAuthorTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */ -export const createJSDocPublicTag: typeof factory.createJSDocPublicTag = deprecate(factory.createJSDocPublicTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */ -export const createJSDocPrivateTag: typeof factory.createJSDocPrivateTag = deprecate(factory.createJSDocPrivateTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */ -export const createJSDocProtectedTag: typeof factory.createJSDocProtectedTag = deprecate(factory.createJSDocProtectedTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */ -export const createJSDocReadonlyTag: typeof factory.createJSDocReadonlyTag = deprecate(factory.createJSDocReadonlyTag, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */ -export const createJSDocTag: typeof factory.createJSDocUnknownTag = deprecate(factory.createJSDocUnknownTag, factoryDeprecation); - -/** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */ -export const createJsxElement: typeof factory.createJsxElement = deprecate(factory.createJsxElement, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */ -export const updateJsxElement: typeof factory.updateJsxElement = deprecate(factory.updateJsxElement, factoryDeprecation); - -/** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ -export const createJsxSelfClosingElement: typeof factory.createJsxSelfClosingElement = deprecate(factory.createJsxSelfClosingElement, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ -export const updateJsxSelfClosingElement: typeof factory.updateJsxSelfClosingElement = deprecate(factory.updateJsxSelfClosingElement, factoryDeprecation); - -/** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */ -export const createJsxOpeningElement: typeof factory.createJsxOpeningElement = deprecate(factory.createJsxOpeningElement, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */ -export const updateJsxOpeningElement: typeof factory.updateJsxOpeningElement = deprecate(factory.updateJsxOpeningElement, factoryDeprecation); - -/** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */ -export const createJsxClosingElement: typeof factory.createJsxClosingElement = deprecate(factory.createJsxClosingElement, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */ -export const updateJsxClosingElement: typeof factory.updateJsxClosingElement = deprecate(factory.updateJsxClosingElement, factoryDeprecation); - -/** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */ -export const createJsxFragment: typeof factory.createJsxFragment = deprecate(factory.createJsxFragment, factoryDeprecation); - -/** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */ -export const createJsxText: typeof factory.createJsxText = deprecate(factory.createJsxText, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */ -export const updateJsxText: typeof factory.updateJsxText = deprecate(factory.updateJsxText, factoryDeprecation); - -/** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */ -export const createJsxOpeningFragment: typeof factory.createJsxOpeningFragment = deprecate(factory.createJsxOpeningFragment, factoryDeprecation); - -/** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */ -export const createJsxJsxClosingFragment: typeof factory.createJsxJsxClosingFragment = deprecate(factory.createJsxJsxClosingFragment, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */ -export const updateJsxFragment: typeof factory.updateJsxFragment = deprecate(factory.updateJsxFragment, factoryDeprecation); - -/** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */ -export const createJsxAttribute: typeof factory.createJsxAttribute = deprecate(factory.createJsxAttribute, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */ -export const updateJsxAttribute: typeof factory.updateJsxAttribute = deprecate(factory.updateJsxAttribute, factoryDeprecation); - -/** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */ -export const createJsxAttributes: typeof factory.createJsxAttributes = deprecate(factory.createJsxAttributes, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */ -export const updateJsxAttributes: typeof factory.updateJsxAttributes = deprecate(factory.updateJsxAttributes, factoryDeprecation); - -/** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ -export const createJsxSpreadAttribute: typeof factory.createJsxSpreadAttribute = deprecate(factory.createJsxSpreadAttribute, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ -export const updateJsxSpreadAttribute: typeof factory.updateJsxSpreadAttribute = deprecate(factory.updateJsxSpreadAttribute, factoryDeprecation); - -/** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */ -export const createJsxExpression: typeof factory.createJsxExpression = deprecate(factory.createJsxExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */ -export const updateJsxExpression: typeof factory.updateJsxExpression = deprecate(factory.updateJsxExpression, factoryDeprecation); - -/** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */ -export const createCaseClause: typeof factory.createCaseClause = deprecate(factory.createCaseClause, factoryDeprecation); - -/** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */ -export const updateCaseClause: typeof factory.updateCaseClause = deprecate(factory.updateCaseClause, factoryDeprecation); - -/** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */ -export const createDefaultClause: typeof factory.createDefaultClause = deprecate(factory.createDefaultClause, factoryDeprecation); - -/** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */ -export const updateDefaultClause: typeof factory.updateDefaultClause = deprecate(factory.updateDefaultClause, factoryDeprecation); - -/** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */ -export const createHeritageClause: typeof factory.createHeritageClause = deprecate(factory.createHeritageClause, factoryDeprecation); - -/** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */ -export const updateHeritageClause: typeof factory.updateHeritageClause = deprecate(factory.updateHeritageClause, factoryDeprecation); - -/** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */ -export const createCatchClause: typeof factory.createCatchClause = deprecate(factory.createCatchClause, factoryDeprecation); - -/** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ -export const updateCatchClause: typeof factory.updateCatchClause = deprecate(factory.updateCatchClause, factoryDeprecation); - -/** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ -export const createPropertyAssignment: typeof factory.createPropertyAssignment = deprecate(factory.createPropertyAssignment, factoryDeprecation); - -/** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ -export const updatePropertyAssignment: typeof factory.updatePropertyAssignment = deprecate(factory.updatePropertyAssignment, factoryDeprecation); - -/** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ -export const createShorthandPropertyAssignment: typeof factory.createShorthandPropertyAssignment = deprecate(factory.createShorthandPropertyAssignment, factoryDeprecation); - -/** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ -export const updateShorthandPropertyAssignment: typeof factory.updateShorthandPropertyAssignment = deprecate(factory.updateShorthandPropertyAssignment, factoryDeprecation); - -/** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */ -export const createSpreadAssignment: typeof factory.createSpreadAssignment = deprecate(factory.createSpreadAssignment, factoryDeprecation); - -/** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ -export const updateSpreadAssignment: typeof factory.updateSpreadAssignment = deprecate(factory.updateSpreadAssignment, factoryDeprecation); - -/** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ -export const createEnumMember: typeof factory.createEnumMember = deprecate(factory.createEnumMember, factoryDeprecation); - -/** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ -export const updateEnumMember: typeof factory.updateEnumMember = deprecate(factory.updateEnumMember, factoryDeprecation); - -/** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ -export const updateSourceFileNode: typeof factory.updateSourceFile = deprecate(factory.updateSourceFile, factoryDeprecation); - -/** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */ -export const createNotEmittedStatement: typeof factory.createNotEmittedStatement = deprecate(factory.createNotEmittedStatement, factoryDeprecation); - -/** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ -export const createPartiallyEmittedExpression: typeof factory.createPartiallyEmittedExpression = deprecate(factory.createPartiallyEmittedExpression, factoryDeprecation); - -/** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ -export const updatePartiallyEmittedExpression: typeof factory.updatePartiallyEmittedExpression = deprecate(factory.updatePartiallyEmittedExpression, factoryDeprecation); - -/** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */ -export const createCommaList: typeof factory.createCommaListExpression = deprecate(factory.createCommaListExpression, factoryDeprecation); - -/** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */ -export const updateCommaList: typeof factory.updateCommaListExpression = deprecate(factory.updateCommaListExpression, factoryDeprecation); - -/** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ -export const createBundle: typeof factory.createBundle = deprecate(factory.createBundle, factoryDeprecation); - -/** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */ -export const updateBundle: typeof factory.updateBundle = deprecate(factory.updateBundle, factoryDeprecation); - -/** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */ -export const createImmediatelyInvokedFunctionExpression: typeof factory.createImmediatelyInvokedFunctionExpression = deprecate(factory.createImmediatelyInvokedFunctionExpression, factoryDeprecation); - -/** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */ -export const createImmediatelyInvokedArrowFunction: typeof factory.createImmediatelyInvokedArrowFunction = deprecate(factory.createImmediatelyInvokedArrowFunction, factoryDeprecation); - -/** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */ -export const createVoidZero: typeof factory.createVoidZero = deprecate(factory.createVoidZero, factoryDeprecation); - -/** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */ -export const createExportDefault: typeof factory.createExportDefault = deprecate(factory.createExportDefault, factoryDeprecation); - -/** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */ -export const createExternalModuleExport: typeof factory.createExternalModuleExport = deprecate(factory.createExternalModuleExport, factoryDeprecation); - -/** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */ -export const createNamespaceExport: typeof factory.createNamespaceExport = deprecate(factory.createNamespaceExport, factoryDeprecation); - -/** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */ -export const updateNamespaceExport: typeof factory.updateNamespaceExport = deprecate(factory.updateNamespaceExport, factoryDeprecation); - -/** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */ -export const createToken = deprecate(function createToken(kind: TKind): Token { - return factory.createToken(kind); -}, factoryDeprecation); - -/** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */ -export const createIdentifier = deprecate(function createIdentifier(text: string) { - return factory.createIdentifier(text, /*originalKeywordKind*/ undefined); -}, factoryDeprecation); - -/** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */ -export const createTempVariable = deprecate(function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier { - return factory.createTempVariable(recordTempVariable, /*reserveInNestedScopes*/ undefined); -}, factoryDeprecation); - -/** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */ -export const getGeneratedNameForNode = deprecate(function getGeneratedNameForNode(node: Node | undefined): Identifier { - return factory.getGeneratedNameForNode(node, /*flags*/ undefined); -}, factoryDeprecation); - -/** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */ -export const createOptimisticUniqueName = deprecate(function createOptimisticUniqueName(text: string): Identifier { - return factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic); -}, factoryDeprecation); - -/** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */ -export const createFileLevelUniqueName = deprecate(function createFileLevelUniqueName(text: string): Identifier { - return factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel); -}, factoryDeprecation); - -/** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */ -export const createIndexSignature = deprecate(function createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration { - return factory.createIndexSignature(decorators, modifiers, parameters, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ -export const createTypePredicateNode = deprecate(function createTypePredicateNode(parameterName: Identifier | ThisTypeNode | string, type: TypeNode): TypePredicateNode { - return factory.createTypePredicateNode(/*assertsModifier*/ undefined, parameterName, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ -export const updateTypePredicateNode = deprecate(function updateTypePredicateNode(node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode): TypePredicateNode { - return factory.updateTypePredicateNode(node, /*assertsModifier*/ undefined, parameterName, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */ -export const createLiteral = deprecate(function createLiteral(value: string | number | PseudoBigInt | boolean | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): PrimaryExpression { - if (typeof value === "number") { - return factory.createNumericLiteral(value); - } - // eslint-disable-next-line local/no-in-operator - if (typeof value === "object" && "base10Value" in value) { // PseudoBigInt - return factory.createBigIntLiteral(value); - } - if (typeof value === "boolean") { - return value ? factory.createTrue() : factory.createFalse(); - } - if (typeof value === "string") { - return factory.createStringLiteral(value, /*isSingleQuote*/ undefined); - } - return factory.createStringLiteralFromNode(value); -} as { - (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral; - (value: number | PseudoBigInt): NumericLiteral; - (value: boolean): BooleanLiteral; - (value: string | number | PseudoBigInt | boolean): PrimaryExpression; -}, { since: "4.0", warnAfter: "4.1", message: "Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead." }); - -/** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */ -export const createMethodSignature = deprecate(function createMethodSignature( - typeParameters: readonly TypeParameterDeclaration[] | undefined, - parameters: readonly ParameterDeclaration[], - type: TypeNode | undefined, - name: string | PropertyName, - questionToken: QuestionToken | undefined -) { - return factory.createMethodSignature(/*modifiers*/ undefined, name, questionToken, typeParameters, parameters, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */ -export const updateMethodSignature = deprecate(function updateMethodSignature( - node: MethodSignature, - typeParameters: NodeArray | undefined, - parameters: NodeArray, - type: TypeNode | undefined, - name: PropertyName, - questionToken: QuestionToken | undefined -) { - return factory.updateMethodSignature(node, node.modifiers, name, questionToken, typeParameters, parameters, type); -}, factoryDeprecation); - -/** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */ -export const createTypeOperatorNode = deprecate(function createTypeOperatorNode(operatorOrType: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword | TypeNode, type?: TypeNode) { - let operator: TypeOperatorNode["operator"]; - if (type) { - operator = operatorOrType as TypeOperatorNode["operator"]; - } - else { - type = operatorOrType as TypeNode; - operator = SyntaxKind.KeyOfKeyword; - } - return factory.createTypeOperatorNode(operator, type); -} as { - (type: TypeNode): TypeOperatorNode; - (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; -}, factoryDeprecation); - -/** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */ -export const createTaggedTemplate = deprecate(function createTaggedTemplate(tag: Expression, typeArgumentsOrTemplate: readonly TypeNode[] | TemplateLiteral | undefined, template?: TemplateLiteral) { - let typeArguments: readonly TypeNode[] | undefined; - if (template) { - typeArguments = typeArgumentsOrTemplate as readonly TypeNode[] | undefined; - } - else { - template = typeArgumentsOrTemplate as TemplateLiteral; - } - return factory.createTaggedTemplateExpression(tag, typeArguments, template); -} as { - (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; - (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; -}, factoryDeprecation); - -/** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */ -export const updateTaggedTemplate = deprecate(function updateTaggedTemplate(node: TaggedTemplateExpression, tag: Expression, typeArgumentsOrTemplate: readonly TypeNode[] | TemplateLiteral | undefined, template?: TemplateLiteral) { - let typeArguments: readonly TypeNode[] | undefined; - if (template) { - typeArguments = typeArgumentsOrTemplate as readonly TypeNode[] | undefined; - } - else { - template = typeArgumentsOrTemplate as TemplateLiteral; - } - return factory.updateTaggedTemplateExpression(node, tag, typeArguments, template); -} as { - (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; - (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; -}, factoryDeprecation); - -/** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */ -export const updateBinary = deprecate(function updateBinary(node: BinaryExpression, left: Expression, right: Expression, operator: BinaryOperator | BinaryOperatorToken = node.operatorToken) { - if (typeof operator === "number") { - operator = operator === node.operatorToken.kind ? node.operatorToken : factory.createToken(operator); - } - return factory.updateBinaryExpression(node, left, operator, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */ -export const createConditional = deprecate(function createConditional(condition: Expression, questionTokenOrWhenTrue: QuestionToken | Expression, whenTrueOrWhenFalse: Expression, colonToken?: ColonToken, whenFalse?: Expression) { - return arguments.length === 5 ? factory.createConditionalExpression(condition, questionTokenOrWhenTrue as QuestionToken, whenTrueOrWhenFalse, colonToken, whenFalse!) : - arguments.length === 3 ? factory.createConditionalExpression(condition, factory.createToken(SyntaxKind.QuestionToken), questionTokenOrWhenTrue as Expression, factory.createToken(SyntaxKind.ColonToken), whenTrueOrWhenFalse) : - Debug.fail("Argument count mismatch"); -} as { - (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression; - (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; -}, factoryDeprecation); - -/** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */ -export const createYield = deprecate(function createYield(asteriskTokenOrExpression?: AsteriskToken | Expression | undefined, expression?: Expression) { - let asteriskToken: AsteriskToken | undefined; - if (expression) { - asteriskToken = asteriskTokenOrExpression as AsteriskToken; - } - else { - expression = asteriskTokenOrExpression as Expression; - } - return factory.createYieldExpression(asteriskToken, expression); -} as { - (expression?: Expression | undefined): YieldExpression; - (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; -}, factoryDeprecation); - -/** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */ -export const createClassExpression = deprecate(function createClassExpression( - modifiers: readonly Modifier[] | undefined, - name: string | Identifier | undefined, - typeParameters: readonly TypeParameterDeclaration[] | undefined, - heritageClauses: readonly HeritageClause[] | undefined, - members: readonly ClassElement[] -) { - return factory.createClassExpression(/*decorators*/ undefined, modifiers, name, typeParameters, heritageClauses, members); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */ -export const updateClassExpression = deprecate(function updateClassExpression( - node: ClassExpression, - modifiers: readonly Modifier[] | undefined, - name: Identifier | undefined, - typeParameters: readonly TypeParameterDeclaration[] | undefined, - heritageClauses: readonly HeritageClause[] | undefined, - members: readonly ClassElement[] -) { - return factory.updateClassExpression(node, /*decorators*/ undefined, modifiers, name, typeParameters, heritageClauses, members); -}, factoryDeprecation); - -/** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */ -export const createPropertySignature = deprecate(function createPropertySignature( - modifiers: readonly Modifier[] | undefined, - name: PropertyName | string, - questionToken: QuestionToken | undefined, - type: TypeNode | undefined, - initializer?: Expression | undefined -): PropertySignature { - const node = factory.createPropertySignature(modifiers, name, questionToken, type); - (node as Mutable).initializer = initializer; - return node; -}, factoryDeprecation); - -/** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */ -export const updatePropertySignature = deprecate(function updatePropertySignature( - node: PropertySignature, - modifiers: readonly Modifier[] | undefined, - name: PropertyName, - questionToken: QuestionToken | undefined, - type: TypeNode | undefined, - initializer: Expression | undefined -) { - let updated = factory.updatePropertySignature(node, modifiers, name, questionToken, type); - if (node.initializer !== initializer) { - if (updated === node) { - updated = factory.cloneNode(node); - } - (updated as Mutable).initializer = initializer; - } - return updated; -}, factoryDeprecation); - -/** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ -export const createExpressionWithTypeArguments = deprecate(function createExpressionWithTypeArguments(typeArguments: readonly TypeNode[] | undefined, expression: Expression) { - return factory.createExpressionWithTypeArguments(expression, typeArguments); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ -export const updateExpressionWithTypeArguments = deprecate(function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) { - return factory.updateExpressionWithTypeArguments(node, expression, typeArguments); -}, factoryDeprecation); - -/** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */ -export const createArrowFunction = deprecate(function createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanTokenOrBody: ConciseBody | EqualsGreaterThanToken | undefined, body?: ConciseBody) { - return arguments.length === 6 ? factory.createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanTokenOrBody as EqualsGreaterThanToken | undefined, body!) : - arguments.length === 5 ? factory.createArrowFunction(modifiers, typeParameters, parameters, type, /*equalsGreaterThanToken*/ undefined, equalsGreaterThanTokenOrBody as ConciseBody) : - Debug.fail("Argument count mismatch"); -} as { - (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; - (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; -}, factoryDeprecation); - -/** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */ -export const updateArrowFunction = deprecate(function updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanTokenOrBody: EqualsGreaterThanToken | ConciseBody, body?: ConciseBody) { - return arguments.length === 7 ? factory.updateArrowFunction(node, modifiers, typeParameters, parameters, type, equalsGreaterThanTokenOrBody as EqualsGreaterThanToken, body!) : - arguments.length === 6 ? factory.updateArrowFunction(node, modifiers, typeParameters, parameters, type, node.equalsGreaterThanToken, equalsGreaterThanTokenOrBody as ConciseBody) : - Debug.fail("Argument count mismatch"); -} as { - (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; - (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; -}, factoryDeprecation); - -/** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */ -export const createVariableDeclaration = deprecate(function createVariableDeclaration(name: string | BindingName, exclamationTokenOrType?: ExclamationToken | TypeNode, typeOrInitializer?: TypeNode | Expression, initializer?: Expression) { - return arguments.length === 4 ? factory.createVariableDeclaration(name, exclamationTokenOrType as ExclamationToken | undefined, typeOrInitializer as TypeNode | undefined, initializer) : - arguments.length >= 1 && arguments.length <= 3 ? factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, exclamationTokenOrType as TypeNode | undefined, typeOrInitializer as Expression | undefined) : - Debug.fail("Argument count mismatch"); -} as { - (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration; - (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; -}, factoryDeprecation); - -/** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */ -export const updateVariableDeclaration = deprecate(function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, exclamationTokenOrType: ExclamationToken | TypeNode | undefined, typeOrInitializer: TypeNode | Expression | undefined, initializer?: Expression | undefined) { - return arguments.length === 5 ? factory.updateVariableDeclaration(node, name, exclamationTokenOrType as ExclamationToken | undefined, typeOrInitializer as TypeNode | undefined, initializer) : - arguments.length === 4 ? factory.updateVariableDeclaration(node, name, node.exclamationToken, exclamationTokenOrType as TypeNode | undefined, typeOrInitializer as Expression | undefined) : - Debug.fail("Argument count mismatch"); -} as { - (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; -}, factoryDeprecation); - -/** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */ -export const createImportClause = deprecate(function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly = false): ImportClause { - return factory.createImportClause(isTypeOnly, name, namedBindings); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */ -export const updateImportClause = deprecate(function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) { - return factory.updateImportClause(node, isTypeOnly, name, namedBindings); -}, factoryDeprecation); - -/** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */ -export const createExportDeclaration = deprecate(function createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly = false) { - return factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier); -}, factoryDeprecation); - -/** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */ -export const updateExportDeclaration = deprecate(function updateExportDeclaration( - node: ExportDeclaration, - decorators: readonly Decorator[] | undefined, - modifiers: readonly Modifier[] | undefined, - exportClause: NamedExportBindings | undefined, - moduleSpecifier: Expression | undefined, - isTypeOnly: boolean) { - return factory.updateExportDeclaration(node, decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, node.assertClause); -}, factoryDeprecation); - -/** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ -export const createJSDocParamTag = deprecate(function createJSDocParamTag(name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined): JSDocParameterTag { - return factory.createJSDocParameterTag(/*tagName*/ undefined, name, isBracketed, typeExpression, /*isNameFirst*/ false, comment ? factory.createNodeArray([factory.createJSDocText(comment)]) : undefined); -}, factoryDeprecation); - -/** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */ -export const createComma = deprecate(function createComma(left: Expression, right: Expression): Expression { - return factory.createComma(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */ -export const createLessThan = deprecate(function createLessThan(left: Expression, right: Expression): Expression { - return factory.createLessThan(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */ -export const createAssignment = deprecate(function createAssignment(left: Expression, right: Expression): BinaryExpression { - return factory.createAssignment(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */ -export const createStrictEquality = deprecate(function createStrictEquality(left: Expression, right: Expression): BinaryExpression { - return factory.createStrictEquality(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */ -export const createStrictInequality = deprecate(function createStrictInequality(left: Expression, right: Expression): BinaryExpression { - return factory.createStrictInequality(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */ -export const createAdd = deprecate(function createAdd(left: Expression, right: Expression): BinaryExpression { - return factory.createAdd(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */ -export const createSubtract = deprecate(function createSubtract(left: Expression, right: Expression): BinaryExpression { - return factory.createSubtract(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */ -export const createLogicalAnd = deprecate(function createLogicalAnd(left: Expression, right: Expression): BinaryExpression { - return factory.createLogicalAnd(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */ -export const createLogicalOr = deprecate(function createLogicalOr(left: Expression, right: Expression): BinaryExpression { - return factory.createLogicalOr(left, right); -}, factoryDeprecation); - -/** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */ -export const createPostfixIncrement = deprecate(function createPostfixIncrement(operand: Expression): PostfixUnaryExpression { - return factory.createPostfixIncrement(operand); -}, factoryDeprecation); - -/** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */ -export const createLogicalNot = deprecate(function createLogicalNot(operand: Expression): PrefixUnaryExpression { - return factory.createLogicalNot(operand); -}, factoryDeprecation); - -/** @deprecated Use an appropriate `factory` method instead. */ -export const createNode = deprecate(function createNode(kind: SyntaxKind, pos = 0, end = 0): Node { - return setTextRangePosEnd( - kind === SyntaxKind.SourceFile ? parseBaseNodeFactory.createBaseSourceFileNode(kind) : - kind === SyntaxKind.Identifier ? parseBaseNodeFactory.createBaseIdentifierNode(kind) : - kind === SyntaxKind.PrivateIdentifier ? parseBaseNodeFactory.createBasePrivateIdentifierNode(kind) : - !isNodeKind(kind) ? parseBaseNodeFactory.createBaseTokenNode(kind) : - parseBaseNodeFactory.createBaseNode(kind), - pos, - end - ); -}, { since: "4.0", warnAfter: "4.1", message: "Use an appropriate `factory` method instead." }); - -/** - * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set. - * - * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be - * captured with respect to transformations. - * - * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`. - */ -export const getMutableClone = deprecate(function getMutableClone(node: T): T { - const clone = factory.cloneNode(node); - setTextRange(clone, node); - setParent(clone, node.parent); - return clone; -}, { since: "4.0", warnAfter: "4.1", message: "Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`." }); diff --git a/src/deprecatedCompat/4.0/renamedNodeTests.ts b/src/deprecatedCompat/4.0/renamedNodeTests.ts deleted file mode 100644 index 0b3f0125de6..00000000000 --- a/src/deprecatedCompat/4.0/renamedNodeTests.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - Node, - SyntaxKind, - TypeAssertion, -} from "../_namespaces/ts"; -import { deprecate } from "../deprecate"; - -// DEPRECATION: Renamed node tests -// DEPRECATION PLAN: -// - soft: 4.0 -// - warn: 4.1 -// - error: TBD -/** @deprecated Use `isTypeAssertionExpression` instead. */ -export const isTypeAssertion = deprecate(function isTypeAssertion(node: Node): node is TypeAssertion { - return node.kind === SyntaxKind.TypeAssertionExpression; -}, { - since: "4.0", - warnAfter: "4.1", - message: "Use `isTypeAssertionExpression` instead." -}); diff --git a/src/deprecatedCompat/4.2/abstractConstructorTypes.ts b/src/deprecatedCompat/4.2/abstractConstructorTypes.ts deleted file mode 100644 index 5de292fb9bc..00000000000 --- a/src/deprecatedCompat/4.2/abstractConstructorTypes.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - addNodeFactoryPatcher, - buildOverload, - ConstructorTypeNode, - factory, - Modifier, - NodeArray, - NodeFactory, - ParameterDeclaration, - TypeNode, - TypeParameterDeclaration, -} from "../_namespaces/ts"; - -// DEPRECATION: Overloads for createConstructorTypeNode/updateConstructorTypeNode that do not accept 'modifiers' -// DEPRECATION PLAN: -// - soft: 4.2 -// - warn: 4.3 -// - error: 5.0 -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface NodeFactory { - /** @deprecated Use the overload that accepts 'modifiers' */ - createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; - - /** @deprecated Use the overload that accepts 'modifiers' */ - updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode): ConstructorTypeNode; - } -} - -function patchNodeFactory(factory: NodeFactory) { - const { - createConstructorTypeNode, - updateConstructorTypeNode, - } = factory; - - factory.createConstructorTypeNode = buildOverload("createConstructorTypeNode") - .overload({ - 0(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode { - return createConstructorTypeNode(modifiers, typeParameters, parameters, type); - }, - - 1(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode { - return createConstructorTypeNode(/*modifiers*/ undefined, typeParameters, parameters, type); - }, - }) - .bind({ - 0: args => args.length === 4, - 1: args => args.length === 3, - }) - .deprecate({ - 1: { since: "4.2", warnAfter: "4.3", message: "Use the overload that accepts 'modifiers'" } - }) - .finish(); - - factory.updateConstructorTypeNode = buildOverload("updateConstructorTypeNode") - .overload({ - 0(node: ConstructorTypeNode, modifiers: readonly Modifier[] | undefined, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode) { - return updateConstructorTypeNode(node, modifiers, typeParameters, parameters, type); - }, - - 1(node: ConstructorTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode) { - return updateConstructorTypeNode(node, node.modifiers, typeParameters, parameters, type); - } - }) - .bind({ - 0: args => args.length === 5, - 1: args => args.length === 4, - }) - .deprecate({ - 1: { since: "4.2", warnAfter: "4.3", message: "Use the overload that accepts 'modifiers'" } - }) - .finish(); -} - -// Patch `createNodeFactory` because it creates the factories that are provided to transformers -// in the public API. -addNodeFactoryPatcher(patchNodeFactory); - -// Patch `ts.factory` because its public -patchNodeFactory(factory); diff --git a/src/deprecatedCompat/4.2/renamedNodeTests.ts b/src/deprecatedCompat/4.2/renamedNodeTests.ts deleted file mode 100644 index 78a0f155f53..00000000000 --- a/src/deprecatedCompat/4.2/renamedNodeTests.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { - isMemberName, - MemberName, - Node, -} from "../_namespaces/ts"; -import { deprecate } from "../deprecate"; - -// DEPRECATION: Renamed node tests -// DEPRECATION PLAN: -// - soft: 4.2 -// - warn: 4.3 -// - error: 5.0 -/** - * @deprecated Use `isMemberName` instead. - */ -export const isIdentifierOrPrivateIdentifier = deprecate(function isIdentifierOrPrivateIdentifier(node: Node): node is MemberName { - return isMemberName(node); -}, { - since: "4.2", - warnAfter: "4.3", - message: "Use `isMemberName` instead." -}); diff --git a/src/deprecatedCompat/4.6/importTypeAssertions.ts b/src/deprecatedCompat/4.6/importTypeAssertions.ts deleted file mode 100644 index 738eb2327d1..00000000000 --- a/src/deprecatedCompat/4.6/importTypeAssertions.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { - addNodeFactoryPatcher, - buildOverload, - EntityName, - factory, - ImportTypeAssertionContainer, - ImportTypeNode, - isArray, - isEntityName, - isImportTypeAssertionContainer, - NodeFactory, - TypeNode, -} from "../_namespaces/ts"; - -// DEPRECATION: Overloads to createImportTypeNode/updateImportTypeNode that do not accept `assertions` -// DEPRECATION PLAN: -// - soft: 4.6 -// - warn: 4.7 -// - error: 5.0 -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface NodeFactory { - // NOTE: The following overload is not deprecated, but exists to ensure we don't mark `createImportTypeNode(argument)` as deprecated due to optional parameters. - createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - - /** @deprecated Use the overload that accepts 'assertions' */ - createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - - /** @deprecated Use the overload that accepts 'assertions' */ - updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; - } -} - -function patchNodeFactory(factory: NodeFactory) { - const { - createImportTypeNode, - updateImportTypeNode, - } = factory; - - factory.createImportTypeNode = buildOverload("createImportTypeNode") - .overload({ - 0(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode { - return createImportTypeNode(argument, assertions, qualifier, typeArguments, isTypeOf); - }, - - 1(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode { - return createImportTypeNode(argument, /*assertions*/ undefined, qualifier, typeArguments, isTypeOf); - }, - }) - .bind({ - 0: ([, assertions, qualifier, typeArguments, isTypeOf]) => - (assertions === undefined || isImportTypeAssertionContainer(assertions)) && - (qualifier === undefined || !isArray(qualifier)) && - (typeArguments === undefined || isArray(typeArguments)) && - (isTypeOf === undefined || typeof isTypeOf === "boolean"), - - 1: ([, qualifier, typeArguments, isTypeOf, other]) => - (other === undefined) && - (qualifier === undefined || isEntityName(qualifier)) && - (typeArguments === undefined || isArray(typeArguments)) && - (isTypeOf === undefined || typeof isTypeOf === "boolean"), - }) - .deprecate({ - 1: { since: "4.6", warnAfter: "4.7", message: "Use the overload that accepts 'assertions'" } - }) - .finish(); - - factory.updateImportTypeNode = buildOverload("updateImportTypeNode") - .overload({ - 0(node: ImportTypeNode, argument: TypeNode, assertions: ImportTypeAssertionContainer | undefined, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode { - return updateImportTypeNode(node, argument, assertions, qualifier, typeArguments, isTypeOf); - }, - - 1(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode { - return updateImportTypeNode(node, argument, node.assertions, qualifier, typeArguments, isTypeOf); - }, - }) - .bind({ - 0: ([, , assertions, qualifier, typeArguments, isTypeOf]) => - (assertions === undefined || isImportTypeAssertionContainer(assertions)) && - (qualifier === undefined || !isArray(qualifier)) && - (typeArguments === undefined || isArray(typeArguments)) && - (isTypeOf === undefined || typeof isTypeOf === "boolean"), - - 1: ([, , qualifier, typeArguments, isTypeOf, other]) => - (other === undefined) && - (qualifier === undefined || isEntityName(qualifier)) && - (typeArguments === undefined || isArray(typeArguments)) && - (isTypeOf === undefined || typeof isTypeOf === "boolean"), - }). - deprecate({ - 1: { since: "4.6", warnAfter: "4.7", message: "Use the overload that accepts 'assertions'" } - }) - .finish(); -} - -// Patch `createNodeFactory` because it creates the factories that are provided to transformers -// in the public API. -addNodeFactoryPatcher(patchNodeFactory); - -// Patch `ts.factory` because its public -patchNodeFactory(factory); diff --git a/src/deprecatedCompat/4.7/typeParameterModifiers.ts b/src/deprecatedCompat/4.7/typeParameterModifiers.ts deleted file mode 100644 index 97f35beba41..00000000000 --- a/src/deprecatedCompat/4.7/typeParameterModifiers.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { - addNodeFactoryPatcher, - buildOverload, - factory, - Identifier, - isArray, - Modifier, - NodeFactory, - TypeNode, - TypeParameterDeclaration, -} from "../_namespaces/ts"; - -// DEPRECATION: Overloads to createTypeParameter/updateTypeParameter that does not accept `modifiers` -// DEPRECATION PLAN: -// - soft: 4.7 -// - warn: 4.8 -// - error: 5.0 -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface NodeFactory { - /** @deprecated Use the overload that accepts 'modifiers' */ - createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; - - /** @deprecated Use the overload that accepts 'modifiers' */ - updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; - } -} - -function patchNodeFactory(factory: NodeFactory) { - const { - createTypeParameterDeclaration, - updateTypeParameterDeclaration, - } = factory; - - factory.createTypeParameterDeclaration = buildOverload("createTypeParameterDeclaration") - .overload({ - 0(modifiers: readonly Modifier[] | undefined, name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration { - return createTypeParameterDeclaration(modifiers, name, constraint, defaultType); - }, - - 1(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration { - return createTypeParameterDeclaration(/*modifiers*/ undefined, name, constraint, defaultType); - }, - }) - .bind({ - 0: ([modifiers]) => - (modifiers === undefined || isArray(modifiers)), - - 1: ([name]) => - (name !== undefined && !isArray(name)), - }) - .deprecate({ - 1: { since: "4.7", warnAfter: "4.8", message: "Use the overload that accepts 'modifiers'" } - }) - .finish(); - - factory.updateTypeParameterDeclaration = buildOverload("updateTypeParameterDeclaration") - .overload({ - 0(node: TypeParameterDeclaration, modifiers: readonly Modifier[] | undefined, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration { - return updateTypeParameterDeclaration(node, modifiers, name, constraint, defaultType); - }, - - 1(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration { - return updateTypeParameterDeclaration(node, node.modifiers, name, constraint, defaultType); - }, - }) - .bind({ - 0: ([, modifiers]) => - (modifiers === undefined || isArray(modifiers)), - - 1: ([, name]) => - (name !== undefined && !isArray(name)), - }) - .deprecate({ - 1: { since: "4.7", warnAfter: "4.8", message: "Use the overload that accepts 'modifiers'" } - }) - .finish(); -} - -// Patch `createNodeFactory` because it creates the factories that are provided to transformers -// in the public API. -addNodeFactoryPatcher(patchNodeFactory); - -// Patch `ts.factory` because its public -patchNodeFactory(factory); diff --git a/src/deprecatedCompat/4.8/mergeDecoratorsAndModifiers.ts b/src/deprecatedCompat/4.8/mergeDecoratorsAndModifiers.ts deleted file mode 100644 index cbfd4b00d06..00000000000 --- a/src/deprecatedCompat/4.8/mergeDecoratorsAndModifiers.ts +++ /dev/null @@ -1,1499 +0,0 @@ -import { - addNodeFactoryPatcher, - AssertClause, - AsteriskToken, - BindingName, - Block, - buildOverload, - ClassDeclaration, - ClassElement, - ClassExpression, - ClassStaticBlockDeclaration, - concatenate, - ConstructorDeclaration, - Decorator, - DeprecationOptions, - DotDotDotToken, - EnumDeclaration, - EnumMember, - every, - ExclamationToken, - ExportAssignment, - ExportDeclaration, - Expression, - factory, - FunctionDeclaration, - GetAccessorDeclaration, - HeritageClause, - Identifier, - ImportClause, - ImportDeclaration, - ImportEqualsDeclaration, - IndexSignatureDeclaration, - InterfaceDeclaration, - isArray, - isAssertClause, - isAsteriskToken, - isBindingName, - isBlock, - isClassElement, - isDecorator, - isDotDotDotToken, - isExpression, - isHeritageClause, - isIdentifier, - isImportClause, - isModifier, - isModifierLike, - isModuleBody, - isModuleName, - isModuleReference, - isNamedExportBindings, - isParameter, - isPropertyName, - isQuestionOrExclamationToken, - isQuestionToken, - isTypeElement, - isTypeNode, - isTypeParameterDeclaration, - MethodDeclaration, - Modifier, - ModifierLike, - ModuleBody, - ModuleDeclaration, - ModuleName, - ModuleReference, - NamedExportBindings, - NodeFactory, - NodeFlags, - ParameterDeclaration, - PropertyDeclaration, - PropertyName, - QuestionToken, - SetAccessorDeclaration, - some, - TypeAliasDeclaration, - TypeElement, - TypeNode, - TypeParameterDeclaration, -} from "../_namespaces/ts"; - -// DEPRECATION: Deprecate passing `decorators` separate from `modifiers` -// DEPRECATION PLAN: -// - soft: 4.8 -// - warn: 4.9 -// - error: 5.0 -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface Node { - /** - * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. - * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators. - * Use `ts.getDecorators()` to get the decorators of a `Node`. - * - * For example: - * ```ts - * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; - * ``` - */ - readonly decorators?: undefined; - - /** - * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. - * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers. - * Use `ts.getModifiers()` to get the modifiers of a `Node`. - * - * For example: - * ```ts - * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; - * ``` - */ - readonly modifiers?: NodeArray | undefined; - } -} - -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface PropertySignature { - /** @deprecated A property signature cannot have an initializer */ - readonly initializer?: Expression | undefined; - } -} - -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface PropertyAssignment { - /** @deprecated A property assignment cannot have a question token */ - readonly questionToken?: QuestionToken | undefined; - - /** @deprecated A property assignment cannot have an exclamation token */ - readonly exclamationToken?: ExclamationToken | undefined; - } -} - -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface ShorthandPropertyAssignment { - /** @deprecated A shorthand property assignment cannot have modifiers */ - readonly modifiers?: NodeArray | undefined; - - /** @deprecated A shorthand property assignment cannot have a question token */ - readonly questionToken?: QuestionToken | undefined; - - /** @deprecated A shorthand property assignment cannot have an exclamation token */ - readonly exclamationToken?: ExclamationToken | undefined; - } -} - -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface FunctionTypeNode { - /** @deprecated A function type cannot have modifiers */ - readonly modifiers?: NodeArray | undefined; - } -} - -declare module "../../compiler/types" { - // Module transform: converted from interface augmentation - export interface NodeFactory { - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updatePropertyDeclaration(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createMethodDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateMethodDeclaration(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - /** - * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. - */ - createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - /** - * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - /** - * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. - */ - updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - /** - * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. - */ - createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createClassExpression(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassExpression(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; - } -} - -const MUST_MERGE: DeprecationOptions = { since: "4.8", warnAfter: "4.9.0-0", message: "Decorators have been combined with modifiers. Callers should switch to an overload that does not accept a 'decorators' parameter." }; -const DISALLOW_DECORATORS_AND_MODIFIERS: DeprecationOptions = { since: "4.8", warnAfter: "4.9.0-0", message: `Decorators and modifiers are no longer supported for this function. Callers should switch to an overload that does not accept the 'decorators' and 'modifiers' parameters.` }; - -function patchNodeFactory(factory: NodeFactory) { - const { - createParameterDeclaration, - updateParameterDeclaration, - createPropertyDeclaration, - updatePropertyDeclaration, - createMethodDeclaration, - updateMethodDeclaration, - createConstructorDeclaration, - updateConstructorDeclaration, - createGetAccessorDeclaration, - updateGetAccessorDeclaration, - createSetAccessorDeclaration, - updateSetAccessorDeclaration, - createIndexSignature, - updateIndexSignature, - createClassStaticBlockDeclaration, - updateClassStaticBlockDeclaration, - createClassExpression, - updateClassExpression, - createFunctionDeclaration, - updateFunctionDeclaration, - createClassDeclaration, - updateClassDeclaration, - createInterfaceDeclaration, - updateInterfaceDeclaration, - createTypeAliasDeclaration, - updateTypeAliasDeclaration, - createEnumDeclaration, - updateEnumDeclaration, - createModuleDeclaration, - updateModuleDeclaration, - createImportEqualsDeclaration, - updateImportEqualsDeclaration, - createImportDeclaration, - updateImportDeclaration, - createExportAssignment, - updateExportAssignment, - createExportDeclaration, - updateExportDeclaration - } = factory; - - factory.createParameterDeclaration = buildOverload("createParameterDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration { - return createParameterDeclaration(modifiers, dotDotDotToken, name, questionToken, type, initializer); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration { - return createParameterDeclaration(concatenate(decorators, modifiers), dotDotDotToken, name, questionToken, type, initializer); - }, - }) - .bind({ - 0: ([, dotDotDotToken, name, questionToken, type, initializer, other]) => - (other === undefined) && - (dotDotDotToken === undefined || !isArray(dotDotDotToken)) && - (name === undefined || typeof name === "string" || isBindingName(name)) && - (questionToken === undefined || typeof questionToken === "object" && isQuestionToken(questionToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - - 1: ([, modifiers, dotDotDotToken, name, questionToken, type, initializer]) => - (modifiers === undefined || isArray(modifiers)) && - (dotDotDotToken === undefined || typeof dotDotDotToken === "object" && isDotDotDotToken(dotDotDotToken)) && - (name === undefined || typeof name === "string" || isBindingName(name)) && - (questionToken === undefined || isQuestionToken(questionToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateParameterDeclaration = buildOverload("updateParameterDeclaration") - .overload({ - 0(node: ParameterDeclaration, modifiers: readonly ModifierLike[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration { - return updateParameterDeclaration(node, modifiers, dotDotDotToken, name, questionToken, type, initializer); - }, - 1(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration { - return updateParameterDeclaration(node, concatenate(decorators, modifiers), dotDotDotToken, name, questionToken, type, initializer); - }, - }) - .bind({ - 0: ([, , dotDotDotToken, name, questionToken, type, initializer, other]) => - (other === undefined) && - (dotDotDotToken === undefined || !isArray(dotDotDotToken)) && - (name === undefined || typeof name === "string" || isBindingName(name)) && - (questionToken === undefined || typeof questionToken === "object" && isQuestionToken(questionToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - - 1: ([, , modifiers, dotDotDotToken, name, questionToken, type, initializer]) => - (modifiers === undefined || isArray(modifiers)) && - (dotDotDotToken === undefined || typeof dotDotDotToken === "object" && isDotDotDotToken(dotDotDotToken)) && - (name === undefined || typeof name === "string" || isBindingName(name)) && - (questionToken === undefined || isQuestionToken(questionToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createPropertyDeclaration = buildOverload("createPropertyDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration { - return createPropertyDeclaration(modifiers, name, questionOrExclamationToken, type, initializer); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration { - return createPropertyDeclaration(concatenate(decorators, modifiers), name, questionOrExclamationToken, type, initializer); - }, - }) - .bind({ - 0: ([, name, questionOrExclamationToken, type, initializer, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (questionOrExclamationToken === undefined || typeof questionOrExclamationToken === "object" && isQuestionOrExclamationToken(questionOrExclamationToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - - 1: ([, modifiers, name, questionOrExclamationToken, type, initializer]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || typeof name === "string" || isPropertyName(name)) && - (questionOrExclamationToken === undefined || isQuestionOrExclamationToken(questionOrExclamationToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updatePropertyDeclaration = buildOverload("updatePropertyDeclaration") - .overload({ - 0(node: PropertyDeclaration, modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration { - return updatePropertyDeclaration(node, modifiers, name, questionOrExclamationToken, type, initializer); - }, - - 1(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration { - return updatePropertyDeclaration(node, concatenate(decorators, modifiers), name, questionOrExclamationToken, type, initializer); - }, - }) - .bind({ - 0: ([, , name, questionOrExclamationToken, type, initializer, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (questionOrExclamationToken === undefined || typeof questionOrExclamationToken === "object" && isQuestionOrExclamationToken(questionOrExclamationToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - - 1: ([, , modifiers, name, questionOrExclamationToken, type, initializer]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || typeof name === "string" || isPropertyName(name)) && - (questionOrExclamationToken === undefined || isQuestionOrExclamationToken(questionOrExclamationToken)) && - (type === undefined || isTypeNode(type)) && - (initializer === undefined || isExpression(initializer)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createMethodDeclaration = buildOverload("createMethodDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration { - return createMethodDeclaration(modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration { - return createMethodDeclaration(concatenate(decorators, modifiers), asteriskToken, name, questionToken, typeParameters, parameters, type, body); - }, - }) - .bind({ - 0: ([, asteriskToken, name, questionToken, typeParameters, parameters, type, body, other]) => - (other === undefined) && - (asteriskToken === undefined || !isArray(asteriskToken)) && - (name === undefined || typeof name === "string" || isPropertyName(name)) && - (questionToken === undefined || typeof questionToken === "object" && isQuestionToken(questionToken)) && - (typeParameters === undefined || isArray(typeParameters)) && - (parameters === undefined || !some(parameters, isTypeParameterDeclaration)) && - (type === undefined || !isArray(type)) && - (body === undefined || isBlock(body)), - - 1: ([, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body]) => - (modifiers === undefined || isArray(modifiers)) && - (asteriskToken === undefined || typeof asteriskToken === "object" && isAsteriskToken(asteriskToken)) && - (name === undefined || typeof name === "string" || isPropertyName(name)) && - (questionToken === undefined || !isArray(questionToken)) && - (typeParameters === undefined || !some(typeParameters, isParameter)) && - (parameters === undefined || isArray(parameters)) && - (type === undefined || isTypeNode(type)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateMethodDeclaration = buildOverload("updateMethodDeclaration") - .overload({ - 0(node: MethodDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration { - return updateMethodDeclaration(node, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body); - }, - - 1(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration { - return updateMethodDeclaration(node, concatenate(decorators, modifiers), asteriskToken, name, questionToken, typeParameters, parameters, type, body); - }, - }) - .bind({ - 0: ([, , asteriskToken, name, questionToken, typeParameters, parameters, type, body, other]) => - (other === undefined) && - (asteriskToken === undefined || !isArray(asteriskToken)) && - (name === undefined || typeof name === "string" || isPropertyName(name)) && - (questionToken === undefined || typeof questionToken === "object" && isQuestionToken(questionToken)) && - (typeParameters === undefined || isArray(typeParameters)) && - (parameters === undefined || !some(parameters, isTypeParameterDeclaration)) && - (type === undefined || !isArray(type)) && - (body === undefined || isBlock(body)), - - 1: ([, , modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body]) => - (modifiers === undefined || isArray(modifiers)) && - (asteriskToken === undefined || typeof asteriskToken === "object" && isAsteriskToken(asteriskToken)) && - (name === undefined || typeof name === "string" || isPropertyName(name)) && - (questionToken === undefined || !isArray(questionToken)) && - (typeParameters === undefined || !some(typeParameters, isParameter)) && - (parameters === undefined || isArray(parameters)) && - (type === undefined || isTypeNode(type)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createConstructorDeclaration = buildOverload("createConstructorDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration { - return createConstructorDeclaration(modifiers, parameters, body); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration { - return createConstructorDeclaration(modifiers, parameters, body); - }, - }) - .bind({ - 0: ([modifiers, parameters, body, other]) => - (other === undefined) && - (modifiers === undefined || isArray(modifiers)) && - (parameters !== undefined && !some(parameters, isModifier)) && - (body === undefined || !isArray(body)), - - 1: ([decorators, modifiers, parameters, body]) => - (decorators === undefined || !some(decorators, isModifier)) && - (modifiers === undefined || !some(modifiers, isParameter)) && - (parameters !== undefined && isArray(parameters)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateConstructorDeclaration = buildOverload("updateConstructorDeclaration") - .overload({ - 0(node: ConstructorDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration { - return updateConstructorDeclaration(node, modifiers, parameters, body); - }, - - 1(node: ConstructorDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration { - return updateConstructorDeclaration(node, modifiers, parameters, body); - }, - }) - .bind({ - 0: ([, modifiers, parameters, body, other]) => - (other === undefined) && - (modifiers === undefined || isArray(modifiers)) && - (parameters !== undefined && !some(parameters, isModifier)) && - (body === undefined || !isArray(body)), - - 1: ([, decorators, modifiers, parameters, body]) => - (decorators === undefined || !some(decorators, isModifier)) && - (modifiers === undefined || !some(modifiers, isParameter)) && - (parameters !== undefined && isArray(parameters)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createGetAccessorDeclaration = buildOverload("createGetAccessorDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration { - return createGetAccessorDeclaration(modifiers, name, parameters, type, body); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration { - return createGetAccessorDeclaration(concatenate(decorators, modifiers), name, parameters, type, body); - }, - }) - .bind({ - 0: ([, name, parameters, type, body, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (parameters !== undefined && isArray(parameters)) && - (type === undefined || !isArray(type)) && - (body === undefined || isBlock(body)), - - 1: ([, modifiers, name, parameters, type, body]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (parameters !== undefined && isArray(parameters)) && - (type === undefined || isTypeNode(type)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateGetAccessorDeclaration = buildOverload("updateGetAccessorDeclaration") - .overload({ - 0(node: GetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration { - return updateGetAccessorDeclaration(node, modifiers, name, parameters, type, body); - }, - - 1(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration { - return updateGetAccessorDeclaration(node, concatenate(decorators, modifiers), name, parameters, type, body); - }, - }) - .bind({ - 0: ([, , name, parameters, type, body, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (parameters === undefined || isArray(parameters)) && - (type === undefined || !isArray(type)) && - (body === undefined || isBlock(body)), - - 1: ([, , modifiers, name, parameters, type, body]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (parameters === undefined || isArray(parameters)) && - (type === undefined || isTypeNode(type)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createSetAccessorDeclaration = buildOverload("createSetAccessorDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration { - return createSetAccessorDeclaration(modifiers, name, parameters, body); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration { - return createSetAccessorDeclaration(concatenate(decorators, modifiers), name, parameters, body); - }, - }) - .bind({ - 0: ([, name, parameters, body, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (parameters === undefined || isArray(parameters)) && - (body === undefined || !isArray(body)), - - 1: ([, modifiers, name, parameters, body]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (parameters === undefined || isArray(parameters)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateSetAccessorDeclaration = buildOverload("updateSetAccessorDeclaration") - .overload({ - 0(node: SetAccessorDeclaration, modifiers: readonly ModifierLike[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration { - return updateSetAccessorDeclaration(node, modifiers, name, parameters, body); - }, - - 1(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration { - return updateSetAccessorDeclaration(node, concatenate(decorators, modifiers), name, parameters, body); - }, - }) - .bind({ - 0: ([, , name, parameters, body, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (parameters === undefined || isArray(parameters)) && - (body === undefined || !isArray(body)), - - 1: ([, , modifiers, name, parameters, body]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (parameters === undefined || isArray(parameters)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createIndexSignature = buildOverload("createIndexSignature") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): IndexSignatureDeclaration { - return createIndexSignature(modifiers, parameters, type); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): IndexSignatureDeclaration { - return createIndexSignature(modifiers, parameters, type); - }, - }) - .bind({ - 0: ([modifiers, parameters, type, other]) => - (other === undefined) && - (modifiers === undefined || isArray(modifiers)) && - (parameters !== undefined && every(parameters, isParameter)) && - (type === undefined || !isArray(type)), - - 1: ([decorators, modifiers, parameters, type]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || every(modifiers, isModifier)) && - (parameters !== undefined && isArray(parameters)) && - (type === undefined || isTypeNode(type)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateIndexSignature = buildOverload("updateIndexSignature") - .overload({ - 0(node: IndexSignatureDeclaration, modifiers: readonly ModifierLike[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration { - return updateIndexSignature(node, modifiers, parameters, type); - }, - - 1(node: IndexSignatureDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration { - return updateIndexSignature(node, modifiers, parameters, type); - }, - }) - .bind({ - 0: ([, modifiers, parameters, type, other]) => - (other === undefined) && - (modifiers === undefined || isArray(modifiers)) && - (parameters !== undefined && every(parameters, isParameter)) && - (type === undefined || !isArray(type)), - - 1: ([, decorators, modifiers, parameters, type]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || every(modifiers, isModifier)) && - (parameters !== undefined && isArray(parameters)) && - (type === undefined || isTypeNode(type)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createClassStaticBlockDeclaration = buildOverload("createClassStaticBlockDeclaration") - .overload({ - 0(body: Block): ClassStaticBlockDeclaration { - return createClassStaticBlockDeclaration(body); - }, - - 1(_decorators: readonly Decorator[] | undefined, _modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration { - return createClassStaticBlockDeclaration(body); - }, - }) - .bind({ - 0: ([body, other1, other2]) => - (other1 === undefined) && - (other2 === undefined) && - (body === undefined || !isArray(body)), - - 1: ([decorators, modifiers, body]) => - (decorators === undefined || isArray(decorators)) && - (modifiers === undefined || isArray(modifiers)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: DISALLOW_DECORATORS_AND_MODIFIERS - }) - .finish(); - - factory.updateClassStaticBlockDeclaration = buildOverload("updateClassStaticBlockDeclaration") - .overload({ - 0(node: ClassStaticBlockDeclaration, body: Block): ClassStaticBlockDeclaration { - return updateClassStaticBlockDeclaration(node, body); - }, - - 1(node: ClassStaticBlockDeclaration, _decorators: readonly Decorator[] | undefined, _modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration { - return updateClassStaticBlockDeclaration(node, body); - }, - }) - .bind({ - 0: ([, body, other1, other2]) => - (other1 === undefined) && - (other2 === undefined) && - (body === undefined || !isArray(body)), - - 1: ([, decorators, modifiers, body]) => - (decorators === undefined || isArray(decorators)) && - (modifiers === undefined || isArray(decorators)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: DISALLOW_DECORATORS_AND_MODIFIERS - }) - .finish(); - - factory.createClassExpression = buildOverload("createClassExpression") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression { - return createClassExpression(modifiers, name, typeParameters, heritageClauses, members); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression { - return createClassExpression(concatenate(decorators, modifiers), name, typeParameters, heritageClauses, members); - }, - }) - .bind({ - 0: ([, name, typeParameters, heritageClauses, members, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isClassElement)), - - 1: ([, modifiers, name, typeParameters, heritageClauses, members]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || isArray(members)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateClassExpression = buildOverload("updateClassExpression") - .overload({ - 0(node: ClassExpression, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression { - return updateClassExpression(node, modifiers, name, typeParameters, heritageClauses, members); - }, - - 1(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression { - return updateClassExpression(node, concatenate(decorators, modifiers), name, typeParameters, heritageClauses, members); - }, - }) - .bind({ - 0: ([, , name, typeParameters, heritageClauses, members, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isClassElement)), - - 1: ([, , modifiers, name, typeParameters, heritageClauses, members]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || isArray(members)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createFunctionDeclaration = buildOverload("createFunctionDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration { - return createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration { - return createFunctionDeclaration(modifiers, asteriskToken, name, typeParameters, parameters, type, body); - }, - }) - .bind({ - 0: ([, asteriskToken, name, typeParameters, parameters, type, body, other]) => - (other === undefined) && - (asteriskToken === undefined || !isArray(asteriskToken)) && - (name === undefined || typeof name === "string" || isIdentifier(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (parameters === undefined || every(parameters, isParameter)) && - (type === undefined || !isArray(type)) && - (body === undefined || isBlock(body)), - - 1: ([, modifiers, asteriskToken, name, typeParameters, parameters, type, body]) => - (modifiers === undefined || isArray(modifiers)) && - (asteriskToken === undefined || typeof asteriskToken !== "string" && isAsteriskToken(asteriskToken)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (parameters === undefined || isArray(parameters)) && - (type === undefined || isTypeNode(type)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateFunctionDeclaration = buildOverload("updateFunctionDeclaration") - .overload({ - 0(node: FunctionDeclaration, modifiers: readonly ModifierLike[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration { - return updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body); - }, - - 1(node: FunctionDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration { - return updateFunctionDeclaration(node, modifiers, asteriskToken, name, typeParameters, parameters, type, body); - }, - }) - .bind({ - 0: ([, , asteriskToken, name, typeParameters, parameters, type, body, other]) => - (other === undefined) && - (asteriskToken === undefined || !isArray(asteriskToken)) && - (name === undefined || isIdentifier(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (parameters === undefined || every(parameters, isParameter)) && - (type === undefined || !isArray(type)) && - (body === undefined || isBlock(body)), - - 1: ([, , modifiers, asteriskToken, name, typeParameters, parameters, type, body]) => - (modifiers === undefined || isArray(modifiers)) && - (asteriskToken === undefined || typeof asteriskToken !== "string" && isAsteriskToken(asteriskToken)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (parameters === undefined || isArray(parameters)) && - (type === undefined || isTypeNode(type)) && - (body === undefined || isBlock(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createClassDeclaration = buildOverload("createClassDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration { - return createClassDeclaration(modifiers, name, typeParameters, heritageClauses, members); - }, - - 1(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration { - return createClassDeclaration(concatenate(decorators, modifiers), name, typeParameters, heritageClauses, members); - }, - }) - .bind({ - 0: ([, name, typeParameters, heritageClauses, members, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isClassElement)), - - 1: () => true, - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateClassDeclaration = buildOverload("updateClassDeclaration") - .overload({ - 0(node: ClassDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration { - return updateClassDeclaration(node, modifiers, name, typeParameters, heritageClauses, members); - }, - - 1(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration { - return updateClassDeclaration(node, concatenate(decorators, modifiers), name, typeParameters, heritageClauses, members); - }, - }) - .bind({ - 0: ([, , name, typeParameters, heritageClauses, members, other]) => - (other === undefined) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isClassElement)), - - 1: ([, , modifiers, name, typeParameters, heritageClauses, members]) => - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || isArray(members)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createInterfaceDeclaration = buildOverload("createInterfaceDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration { - return createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration { - return createInterfaceDeclaration(modifiers, name, typeParameters, heritageClauses, members); - }, - }) - .bind({ - 0: ([modifiers, name, typeParameters, heritageClauses, members, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isTypeElement)), - - 1: ([decorators, modifiers, name, typeParameters, heritageClauses, members]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isTypeElement)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateInterfaceDeclaration = buildOverload("updateInterfaceDeclaration") - .overload({ - 0(node: InterfaceDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration { - return updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members); - }, - - 1(node: InterfaceDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration { - return updateInterfaceDeclaration(node, modifiers, name, typeParameters, heritageClauses, members); - }, - }) - .bind({ - 0: ([, modifiers, name, typeParameters, heritageClauses, members, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isTypeElement)), - - 1: ([, decorators, modifiers, name, typeParameters, heritageClauses, members]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || every(typeParameters, isTypeParameterDeclaration)) && - (heritageClauses === undefined || every(heritageClauses, isHeritageClause)) && - (members === undefined || every(members, isTypeElement)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createTypeAliasDeclaration = buildOverload("createTypeAliasDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration { - return createTypeAliasDeclaration(modifiers, name, typeParameters, type); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration { - return createTypeAliasDeclaration(modifiers, name, typeParameters, type); - }, - }) - .bind({ - 0: ([modifiers, name, typeParameters, type, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (type === undefined || !isArray(type)), - - 1: ([decorators, modifiers, name, typeParameters, type]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (type === undefined || isTypeNode(type)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateTypeAliasDeclaration = buildOverload("updateTypeAliasDeclaration") - .overload({ - 0(node: TypeAliasDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration { - return updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type); - }, - - 1(node: TypeAliasDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration { - return updateTypeAliasDeclaration(node, modifiers, name, typeParameters, type); - }, - }) - .bind({ - 0: ([, modifiers, name, typeParameters, type, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (type === undefined || !isArray(type)), - - 1: ([, decorators, modifiers, name, typeParameters, type]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (typeParameters === undefined || isArray(typeParameters)) && - (type === undefined || isTypeNode(type)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createEnumDeclaration = buildOverload("createEnumDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration { - return createEnumDeclaration(modifiers, name, members); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration { - return createEnumDeclaration(modifiers, name, members); - }, - }) - .bind({ - 0: ([modifiers, name, members, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (members === undefined || isArray(members)), - - 1: ([decorators, modifiers, name, members]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (members === undefined || isArray(members)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateEnumDeclaration = buildOverload("updateEnumDeclaration") - .overload({ - 0(node: EnumDeclaration, modifiers: readonly ModifierLike[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration { - return updateEnumDeclaration(node, modifiers, name, members); - }, - - 1(node: EnumDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration { - return updateEnumDeclaration(node, modifiers, name, members); - }, - }) - .bind({ - 0: ([, modifiers, name, members, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (members === undefined || isArray(members)), - - 1: ([, decorators, modifiers, name, members]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name === undefined || !isArray(name)) && - (members === undefined || isArray(members)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createModuleDeclaration = buildOverload("createModuleDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration { - return createModuleDeclaration(modifiers, name, body, flags); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration { - return createModuleDeclaration(modifiers, name, body, flags); - }, - }) - .bind({ - 0: ([modifiers, name, body, flags, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name !== undefined && !isArray(name)) && - (body === undefined || isModuleBody(body)) && - (flags === undefined || typeof flags === "number"), - - 1: ([decorators, modifiers, name, body, flags]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name !== undefined && isModuleName(name)) && - (body === undefined || typeof body === "object") && - (flags === undefined || typeof flags === "number"), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateModuleDeclaration = buildOverload("updateModuleDeclaration") - .overload({ - 0(node: ModuleDeclaration, modifiers: readonly ModifierLike[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration { - return updateModuleDeclaration(node, modifiers, name, body); - }, - - 1(node: ModuleDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration { - return updateModuleDeclaration(node, modifiers, name, body); - }, - }) - .bind({ - 0: ([, modifiers, name, body, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (name === undefined || !isArray(name)) && - (body === undefined || isModuleBody(body)), - - 1: ([, decorators, modifiers, name, body]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (name !== undefined && isModuleName(name)) && - (body === undefined || isModuleBody(body)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createImportEqualsDeclaration = buildOverload("createImportEqualsDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration { - return createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration { - return createImportEqualsDeclaration(modifiers, isTypeOnly, name, moduleReference); - }, - }) - .bind({ - 0: ([modifiers, isTypeOnly, name, moduleReference, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (isTypeOnly === undefined || typeof isTypeOnly === "boolean") && - (typeof name !== "boolean") && - (typeof moduleReference !== "string"), - - 1: ([decorators, modifiers, isTypeOnly, name, moduleReference]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (isTypeOnly === undefined || typeof isTypeOnly === "boolean") && - (typeof name === "string" || isIdentifier(name)) && - (moduleReference !== undefined && isModuleReference(moduleReference)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateImportEqualsDeclaration = buildOverload("updateImportEqualsDeclaration") - .overload({ - 0(node: ImportEqualsDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration { - return updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference); - }, - - 1(node: ImportEqualsDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration { - return updateImportEqualsDeclaration(node, modifiers, isTypeOnly, name, moduleReference); - }, - }) - .bind({ - 0: ([, modifiers, isTypeOnly, name, moduleReference, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (isTypeOnly === undefined || typeof isTypeOnly === "boolean") && - (typeof name !== "boolean") && - (typeof moduleReference !== "string"), - - 1: ([, decorators, modifiers, isTypeOnly, name, moduleReference]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (isTypeOnly === undefined || typeof isTypeOnly === "boolean") && - (typeof name === "string" || isIdentifier(name)) && - (moduleReference !== undefined && isModuleReference(moduleReference)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createImportDeclaration = buildOverload("createImportDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration { - return createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration { - return createImportDeclaration(modifiers, importClause, moduleSpecifier, assertClause); - }, - }) - .bind({ - 0: ([modifiers, importClause, moduleSpecifier, assertClause, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (importClause === undefined || !isArray(importClause)) && - (moduleSpecifier !== undefined && isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - - 1: ([decorators, modifiers, importClause, moduleSpecifier, assertClause]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (importClause === undefined || isImportClause(importClause)) && - (moduleSpecifier !== undefined && isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateImportDeclaration = buildOverload("updateImportDeclaration") - .overload({ - 0(node: ImportDeclaration, modifiers: readonly ModifierLike[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration { - return updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause); - }, - - 1(node: ImportDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration { - return updateImportDeclaration(node, modifiers, importClause, moduleSpecifier, assertClause); - }, - }) - .bind({ - 0: ([, modifiers, importClause, moduleSpecifier, assertClause, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (importClause === undefined || !isArray(importClause)) && - (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - - 1: ([, decorators, modifiers, importClause, moduleSpecifier, assertClause]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (importClause === undefined || isImportClause(importClause)) && - (moduleSpecifier !== undefined && isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createExportAssignment = buildOverload("createExportAssignment") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment { - return createExportAssignment(modifiers, isExportEquals, expression); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment { - return createExportAssignment(modifiers, isExportEquals, expression); - }, - }) - .bind({ - 0: ([modifiers, isExportEquals, expression, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (isExportEquals === undefined || typeof isExportEquals === "boolean") && - (typeof expression === "object"), - - 1: ([decorators, modifiers, isExportEquals, expression]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (isExportEquals === undefined || typeof isExportEquals === "boolean") && - (expression !== undefined && isExpression(expression)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateExportAssignment = buildOverload("updateExportAssignment") - .overload({ - 0(node: ExportAssignment, modifiers: readonly ModifierLike[] | undefined, expression: Expression): ExportAssignment { - return updateExportAssignment(node, modifiers, expression); - }, - - 1(node: ExportAssignment, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment { - return updateExportAssignment(node, modifiers, expression); - }, - }) - .bind({ - 0: ([, modifiers, expression, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (expression !== undefined && !isArray(expression)), - - 1: ([, decorators, modifiers, expression]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (expression !== undefined && isExpression(expression)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.createExportDeclaration = buildOverload("createExportDeclaration") - .overload({ - 0(modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration { - return createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); - }, - - 1(_decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration { - return createExportDeclaration(modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); - }, - }) - .bind({ - 0: ([modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (typeof isTypeOnly === "boolean") && - (typeof exportClause !== "boolean") && - (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - - 1: ([decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (typeof isTypeOnly === "boolean") && - (exportClause === undefined || isNamedExportBindings(exportClause)) && - (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); - - factory.updateExportDeclaration = buildOverload("updateExportDeclaration") - .overload({ - 0(node: ExportDeclaration, modifiers: readonly ModifierLike[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration { - return updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); - }, - - 1(node: ExportDeclaration, _decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration { - return updateExportDeclaration(node, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); - }, - }) - .bind({ - 0: ([, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause, other]) => - (other === undefined) && - (modifiers === undefined || every(modifiers, isModifierLike)) && - (typeof isTypeOnly === "boolean") && - (typeof exportClause !== "boolean") && - (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - - 1: ([, decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause]) => - (decorators === undefined || every(decorators, isDecorator)) && - (modifiers === undefined || isArray(modifiers)) && - (typeof isTypeOnly === "boolean") && - (exportClause === undefined || isNamedExportBindings(exportClause)) && - (moduleSpecifier === undefined || isExpression(moduleSpecifier)) && - (assertClause === undefined || isAssertClause(assertClause)), - }) - .deprecate({ - 1: MUST_MERGE - }) - .finish(); -} - -// Patch `createNodeFactory` because it creates the factories that are provided to transformers -// in the public API. -addNodeFactoryPatcher(patchNodeFactory); - -// Patch `ts.factory` because its public -patchNodeFactory(factory); diff --git a/src/deprecatedCompat/_namespaces/ts.ts b/src/deprecatedCompat/_namespaces/ts.ts index e74bb6da372..637e61365be 100644 --- a/src/deprecatedCompat/_namespaces/ts.ts +++ b/src/deprecatedCompat/_namespaces/ts.ts @@ -2,11 +2,4 @@ export * from "../../compiler/_namespaces/ts"; export * from "../deprecations"; -export * from "../4.0/nodeFactoryTopLevelExports"; -export * from "../4.0/renamedNodeTests"; -export * from "../4.2/renamedNodeTests"; -export * from "../4.2/abstractConstructorTypes"; -export * from "../4.6/importTypeAssertions"; -export * from "../4.7/typeParameterModifiers"; -export * from "../4.8/mergeDecoratorsAndModifiers"; export * from "../5.0/identifierProperties"; diff --git a/src/testRunner/unittests/factory.ts b/src/testRunner/unittests/factory.ts index ba452391c80..5740c30c907 100644 --- a/src/testRunner/unittests/factory.ts +++ b/src/testRunner/unittests/factory.ts @@ -1,6 +1,4 @@ import * as ts from "../_namespaces/ts"; -import { setEnableDeprecationWarnings } from "../../deprecatedCompat/deprecate"; -import { Modifier } from "../_namespaces/ts"; describe("unittests:: FactoryAPI", () => { function assertSyntaxKind(node: ts.Node, expected: ts.SyntaxKind) { @@ -85,38 +83,4 @@ describe("unittests:: FactoryAPI", () => { }); }); - describe("deprecations", () => { - beforeEach(() => { - setEnableDeprecationWarnings(false); - }); - - afterEach(() => { - setEnableDeprecationWarnings(true); - }); - - // https://github.com/microsoft/TypeScript/issues/50259 - it("deprecated createConstructorDeclaration overload does not throw", () => { - const body = ts.factory.createBlock([]); - assert.doesNotThrow(() => ts.factory.createConstructorDeclaration( - /*decorators*/ undefined, - /*modifiers*/ undefined, - /*parameters*/ [], - body, - )); - }); - - // https://github.com/microsoft/TypeScript/issues/50259 - it("deprecated updateConstructorDeclaration overload does not throw", () => { - const body = ts.factory.createBlock([]); - const ctor = ts.factory.createConstructorDeclaration(/*modifiers*/ undefined, [], body); - assert.doesNotThrow(() => ts.factory.updateConstructorDeclaration( - ctor, - ctor.decorators, - ctor.modifiers as readonly Modifier[] | undefined, - ctor.parameters, - ctor.body, - )); - }); - }); - }); diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 6df6194073c..a140f1878c0 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -4533,30 +4533,6 @@ declare namespace ts { getLastToken(sourceFile?: SourceFile): Node | undefined; forEachChild(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined; } - interface Node { - /** - * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. - * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators. - * Use `ts.getDecorators()` to get the decorators of a `Node`. - * - * For example: - * ```ts - * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; - * ``` - */ - readonly decorators?: undefined; - /** - * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. - * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers. - * Use `ts.getModifiers()` to get the modifiers of a `Node`. - * - * For example: - * ```ts - * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; - * ``` - */ - readonly modifiers?: NodeArray | undefined; - } interface JSDocContainer extends Node { _jsdocContainerBrand: any; } @@ -4757,10 +4733,6 @@ declare namespace ts { readonly questionToken?: QuestionToken; readonly type?: TypeNode; } - interface PropertySignature { - /** @deprecated A property signature cannot have an initializer */ - readonly initializer?: Expression | undefined; - } interface PropertyDeclaration extends ClassElement, JSDocContainer { readonly kind: SyntaxKind.PropertyDeclaration; readonly parent: ClassLikeDeclaration; @@ -4786,12 +4758,6 @@ declare namespace ts { readonly name: PropertyName; readonly initializer: Expression; } - interface PropertyAssignment { - /** @deprecated A property assignment cannot have a question token */ - readonly questionToken?: QuestionToken | undefined; - /** @deprecated A property assignment cannot have an exclamation token */ - readonly exclamationToken?: ExclamationToken | undefined; - } interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.ShorthandPropertyAssignment; readonly parent: ObjectLiteralExpression; @@ -4799,14 +4765,6 @@ declare namespace ts { readonly equalsToken?: EqualsToken; readonly objectAssignmentInitializer?: Expression; } - interface ShorthandPropertyAssignment { - /** @deprecated A shorthand property assignment cannot have modifiers */ - readonly modifiers?: NodeArray | undefined; - /** @deprecated A shorthand property assignment cannot have a question token */ - readonly questionToken?: QuestionToken | undefined; - /** @deprecated A shorthand property assignment cannot have an exclamation token */ - readonly exclamationToken?: ExclamationToken | undefined; - } interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.SpreadAssignment; readonly parent: ObjectLiteralExpression; @@ -4929,10 +4887,6 @@ declare namespace ts { interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.FunctionType; } - interface FunctionTypeNode { - /** @deprecated A function type cannot have modifiers */ - readonly modifiers?: NodeArray | undefined; - } interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.ConstructorType; readonly modifiers?: NodeArray; @@ -7984,179 +7938,6 @@ declare namespace ts { createExternalModuleExport(exportName: Identifier): ExportDeclaration; restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; } - interface NodeFactory { - /** @deprecated Use the overload that accepts 'modifiers' */ - createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; - /** @deprecated Use the overload that accepts 'modifiers' */ - updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode): ConstructorTypeNode; - } - interface NodeFactory { - createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - /** @deprecated Use the overload that accepts 'assertions' */ - createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - /** @deprecated Use the overload that accepts 'assertions' */ - updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; - } - interface NodeFactory { - /** @deprecated Use the overload that accepts 'modifiers' */ - createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; - /** @deprecated Use the overload that accepts 'modifiers' */ - updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; - } - interface NodeFactory { - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updatePropertyDeclaration(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createMethodDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateMethodDeclaration(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - /** - * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. - */ - createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - /** - * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - /** - * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. - */ - updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - /** - * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. - */ - createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createClassExpression(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassExpression(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; - } interface CoreTransformationContext { readonly factory: NodeFactory; /** Gets the compiler options supplied to the transformer. */ @@ -11218,738 +10999,5 @@ declare namespace ts { * @param compilerOptions Optional compiler options. */ function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; - /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */ - const createNodeArray: typeof factory.createNodeArray; - /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */ - const createNumericLiteral: typeof factory.createNumericLiteral; - /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */ - const createBigIntLiteral: typeof factory.createBigIntLiteral; - /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */ - const createStringLiteral: typeof factory.createStringLiteral; - /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ - const createStringLiteralFromNode: typeof factory.createStringLiteralFromNode; - /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ - const createRegularExpressionLiteral: typeof factory.createRegularExpressionLiteral; - /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ - const createLoopVariable: typeof factory.createLoopVariable; - /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */ - const createUniqueName: typeof factory.createUniqueName; - /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */ - const createPrivateIdentifier: typeof factory.createPrivateIdentifier; - /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */ - const createSuper: typeof factory.createSuper; - /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */ - const createThis: typeof factory.createThis; - /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */ - const createNull: typeof factory.createNull; - /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */ - const createTrue: typeof factory.createTrue; - /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */ - const createFalse: typeof factory.createFalse; - /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ - const createModifier: typeof factory.createModifier; - /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ - const createModifiersFromModifierFlags: typeof factory.createModifiersFromModifierFlags; - /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ - const createQualifiedName: typeof factory.createQualifiedName; - /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ - const updateQualifiedName: typeof factory.updateQualifiedName; - /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */ - const createComputedPropertyName: typeof factory.createComputedPropertyName; - /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ - const updateComputedPropertyName: typeof factory.updateComputedPropertyName; - /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ - const createTypeParameterDeclaration: typeof factory.createTypeParameterDeclaration; - /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ - const updateTypeParameterDeclaration: typeof factory.updateTypeParameterDeclaration; - /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ - const createParameter: typeof factory.createParameterDeclaration; - /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ - const updateParameter: typeof factory.updateParameterDeclaration; - /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ - const createDecorator: typeof factory.createDecorator; - /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ - const updateDecorator: typeof factory.updateDecorator; - /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ - const createProperty: typeof factory.createPropertyDeclaration; - /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ - const updateProperty: typeof factory.updatePropertyDeclaration; - /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ - const createMethod: typeof factory.createMethodDeclaration; - /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ - const updateMethod: typeof factory.updateMethodDeclaration; - /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ - const createConstructor: typeof factory.createConstructorDeclaration; - /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ - const updateConstructor: typeof factory.updateConstructorDeclaration; - /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const createGetAccessor: typeof factory.createGetAccessorDeclaration; - /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const updateGetAccessor: typeof factory.updateGetAccessorDeclaration; - /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const createSetAccessor: typeof factory.createSetAccessorDeclaration; - /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const updateSetAccessor: typeof factory.updateSetAccessorDeclaration; - /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ - const createCallSignature: typeof factory.createCallSignature; - /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */ - const updateCallSignature: typeof factory.updateCallSignature; - /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */ - const createConstructSignature: typeof factory.createConstructSignature; - /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */ - const updateConstructSignature: typeof factory.updateConstructSignature; - /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */ - const updateIndexSignature: typeof factory.updateIndexSignature; - /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */ - const createKeywordTypeNode: typeof factory.createKeywordTypeNode; - /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ - const createTypePredicateNodeWithModifier: typeof factory.createTypePredicateNode; - /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ - const updateTypePredicateNodeWithModifier: typeof factory.updateTypePredicateNode; - /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ - const createTypeReferenceNode: typeof factory.createTypeReferenceNode; - /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ - const updateTypeReferenceNode: typeof factory.updateTypeReferenceNode; - /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ - const createFunctionTypeNode: typeof factory.createFunctionTypeNode; - /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */ - const updateFunctionTypeNode: typeof factory.updateFunctionTypeNode; - /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */ - const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode; - /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ - const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode) => ConstructorTypeNode; - /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ - const createTypeQueryNode: typeof factory.createTypeQueryNode; - /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ - const updateTypeQueryNode: typeof factory.updateTypeQueryNode; - /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ - const createTypeLiteralNode: typeof factory.createTypeLiteralNode; - /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ - const updateTypeLiteralNode: typeof factory.updateTypeLiteralNode; - /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */ - const createArrayTypeNode: typeof factory.createArrayTypeNode; - /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */ - const updateArrayTypeNode: typeof factory.updateArrayTypeNode; - /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */ - const createTupleTypeNode: typeof factory.createTupleTypeNode; - /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */ - const updateTupleTypeNode: typeof factory.updateTupleTypeNode; - /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */ - const createOptionalTypeNode: typeof factory.createOptionalTypeNode; - /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */ - const updateOptionalTypeNode: typeof factory.updateOptionalTypeNode; - /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */ - const createRestTypeNode: typeof factory.createRestTypeNode; - /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */ - const updateRestTypeNode: typeof factory.updateRestTypeNode; - /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */ - const createUnionTypeNode: typeof factory.createUnionTypeNode; - /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */ - const updateUnionTypeNode: typeof factory.updateUnionTypeNode; - /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */ - const createIntersectionTypeNode: typeof factory.createIntersectionTypeNode; - /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */ - const updateIntersectionTypeNode: typeof factory.updateIntersectionTypeNode; - /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */ - const createConditionalTypeNode: typeof factory.createConditionalTypeNode; - /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */ - const updateConditionalTypeNode: typeof factory.updateConditionalTypeNode; - /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */ - const createInferTypeNode: typeof factory.createInferTypeNode; - /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ - const updateInferTypeNode: typeof factory.updateInferTypeNode; - /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ - const createImportTypeNode: typeof factory.createImportTypeNode; - /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ - const updateImportTypeNode: typeof factory.updateImportTypeNode; - /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ - const createParenthesizedType: typeof factory.createParenthesizedType; - /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ - const updateParenthesizedType: typeof factory.updateParenthesizedType; - /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */ - const createThisTypeNode: typeof factory.createThisTypeNode; - /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */ - const updateTypeOperatorNode: typeof factory.updateTypeOperatorNode; - /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ - const createIndexedAccessTypeNode: typeof factory.createIndexedAccessTypeNode; - /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ - const updateIndexedAccessTypeNode: typeof factory.updateIndexedAccessTypeNode; - /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ - const createMappedTypeNode: typeof factory.createMappedTypeNode; - /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ - const updateMappedTypeNode: typeof factory.updateMappedTypeNode; - /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ - const createLiteralTypeNode: typeof factory.createLiteralTypeNode; - /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ - const updateLiteralTypeNode: typeof factory.updateLiteralTypeNode; - /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ - const createObjectBindingPattern: typeof factory.createObjectBindingPattern; - /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ - const updateObjectBindingPattern: typeof factory.updateObjectBindingPattern; - /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */ - const createArrayBindingPattern: typeof factory.createArrayBindingPattern; - /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ - const updateArrayBindingPattern: typeof factory.updateArrayBindingPattern; - /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ - const createBindingElement: typeof factory.createBindingElement; - /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ - const updateBindingElement: typeof factory.updateBindingElement; - /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */ - const createArrayLiteral: typeof factory.createArrayLiteralExpression; - /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */ - const updateArrayLiteral: typeof factory.updateArrayLiteralExpression; - /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */ - const createObjectLiteral: typeof factory.createObjectLiteralExpression; - /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */ - const updateObjectLiteral: typeof factory.updateObjectLiteralExpression; - /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */ - const createPropertyAccess: typeof factory.createPropertyAccessExpression; - /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */ - const updatePropertyAccess: typeof factory.updatePropertyAccessExpression; - /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ - const createPropertyAccessChain: typeof factory.createPropertyAccessChain; - /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ - const updatePropertyAccessChain: typeof factory.updatePropertyAccessChain; - /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */ - const createElementAccess: typeof factory.createElementAccessExpression; - /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */ - const updateElementAccess: typeof factory.updateElementAccessExpression; - /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ - const createElementAccessChain: typeof factory.createElementAccessChain; - /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ - const updateElementAccessChain: typeof factory.updateElementAccessChain; - /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */ - const createCall: typeof factory.createCallExpression; - /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */ - const updateCall: typeof factory.updateCallExpression; - /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ - const createCallChain: typeof factory.createCallChain; - /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ - const updateCallChain: typeof factory.updateCallChain; - /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */ - const createNew: typeof factory.createNewExpression; - /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */ - const updateNew: typeof factory.updateNewExpression; - /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ - const createTypeAssertion: typeof factory.createTypeAssertion; - /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ - const updateTypeAssertion: typeof factory.updateTypeAssertion; - /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */ - const createParen: typeof factory.createParenthesizedExpression; - /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */ - const updateParen: typeof factory.updateParenthesizedExpression; - /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ - const createFunctionExpression: typeof factory.createFunctionExpression; - /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ - const updateFunctionExpression: typeof factory.updateFunctionExpression; - /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */ - const createDelete: typeof factory.createDeleteExpression; - /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */ - const updateDelete: typeof factory.updateDeleteExpression; - /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */ - const createTypeOf: typeof factory.createTypeOfExpression; - /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */ - const updateTypeOf: typeof factory.updateTypeOfExpression; - /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */ - const createVoid: typeof factory.createVoidExpression; - /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */ - const updateVoid: typeof factory.updateVoidExpression; - /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */ - const createAwait: typeof factory.createAwaitExpression; - /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */ - const updateAwait: typeof factory.updateAwaitExpression; - /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */ - const createPrefix: typeof factory.createPrefixUnaryExpression; - /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */ - const updatePrefix: typeof factory.updatePrefixUnaryExpression; - /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */ - const createPostfix: typeof factory.createPostfixUnaryExpression; - /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */ - const updatePostfix: typeof factory.updatePostfixUnaryExpression; - /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */ - const createBinary: typeof factory.createBinaryExpression; - /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */ - const updateConditional: typeof factory.updateConditionalExpression; - /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ - const createTemplateExpression: typeof factory.createTemplateExpression; - /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */ - const updateTemplateExpression: typeof factory.updateTemplateExpression; - /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */ - const createTemplateHead: typeof factory.createTemplateHead; - /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */ - const createTemplateMiddle: typeof factory.createTemplateMiddle; - /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */ - const createTemplateTail: typeof factory.createTemplateTail; - /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */ - const createNoSubstitutionTemplateLiteral: typeof factory.createNoSubstitutionTemplateLiteral; - /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */ - const updateYield: typeof factory.updateYieldExpression; - /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */ - const createSpread: typeof factory.createSpreadElement; - /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */ - const updateSpread: typeof factory.updateSpreadElement; - /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ - const createOmittedExpression: typeof factory.createOmittedExpression; - /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */ - const createAsExpression: typeof factory.createAsExpression; - /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */ - const updateAsExpression: typeof factory.updateAsExpression; - /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */ - const createNonNullExpression: typeof factory.createNonNullExpression; - /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */ - const updateNonNullExpression: typeof factory.updateNonNullExpression; - /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */ - const createNonNullChain: typeof factory.createNonNullChain; - /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */ - const updateNonNullChain: typeof factory.updateNonNullChain; - /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */ - const createMetaProperty: typeof factory.createMetaProperty; - /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */ - const updateMetaProperty: typeof factory.updateMetaProperty; - /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */ - const createTemplateSpan: typeof factory.createTemplateSpan; - /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */ - const updateTemplateSpan: typeof factory.updateTemplateSpan; - /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */ - const createSemicolonClassElement: typeof factory.createSemicolonClassElement; - /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */ - const createBlock: typeof factory.createBlock; - /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */ - const updateBlock: typeof factory.updateBlock; - /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */ - const createVariableStatement: typeof factory.createVariableStatement; - /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */ - const updateVariableStatement: typeof factory.updateVariableStatement; - /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */ - const createEmptyStatement: typeof factory.createEmptyStatement; - /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ - const createExpressionStatement: typeof factory.createExpressionStatement; - /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ - const updateExpressionStatement: typeof factory.updateExpressionStatement; - /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ - const createStatement: typeof factory.createExpressionStatement; - /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ - const updateStatement: typeof factory.updateExpressionStatement; - /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */ - const createIf: typeof factory.createIfStatement; - /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */ - const updateIf: typeof factory.updateIfStatement; - /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */ - const createDo: typeof factory.createDoStatement; - /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */ - const updateDo: typeof factory.updateDoStatement; - /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */ - const createWhile: typeof factory.createWhileStatement; - /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */ - const updateWhile: typeof factory.updateWhileStatement; - /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */ - const createFor: typeof factory.createForStatement; - /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */ - const updateFor: typeof factory.updateForStatement; - /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */ - const createForIn: typeof factory.createForInStatement; - /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */ - const updateForIn: typeof factory.updateForInStatement; - /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */ - const createForOf: typeof factory.createForOfStatement; - /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */ - const updateForOf: typeof factory.updateForOfStatement; - /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */ - const createContinue: typeof factory.createContinueStatement; - /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */ - const updateContinue: typeof factory.updateContinueStatement; - /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */ - const createBreak: typeof factory.createBreakStatement; - /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */ - const updateBreak: typeof factory.updateBreakStatement; - /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */ - const createReturn: typeof factory.createReturnStatement; - /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */ - const updateReturn: typeof factory.updateReturnStatement; - /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */ - const createWith: typeof factory.createWithStatement; - /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */ - const updateWith: typeof factory.updateWithStatement; - /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */ - const createSwitch: typeof factory.createSwitchStatement; - /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */ - const updateSwitch: typeof factory.updateSwitchStatement; - /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */ - const createLabel: typeof factory.createLabeledStatement; - /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */ - const updateLabel: typeof factory.updateLabeledStatement; - /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */ - const createThrow: typeof factory.createThrowStatement; - /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */ - const updateThrow: typeof factory.updateThrowStatement; - /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */ - const createTry: typeof factory.createTryStatement; - /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */ - const updateTry: typeof factory.updateTryStatement; - /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ - const createDebuggerStatement: typeof factory.createDebuggerStatement; - /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */ - const createVariableDeclarationList: typeof factory.createVariableDeclarationList; - /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */ - const updateVariableDeclarationList: typeof factory.updateVariableDeclarationList; - /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */ - const createFunctionDeclaration: typeof factory.createFunctionDeclaration; - /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */ - const updateFunctionDeclaration: typeof factory.updateFunctionDeclaration; - /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */ - const createClassDeclaration: typeof factory.createClassDeclaration; - /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */ - const updateClassDeclaration: typeof factory.updateClassDeclaration; - /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */ - const createInterfaceDeclaration: typeof factory.createInterfaceDeclaration; - /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */ - const updateInterfaceDeclaration: typeof factory.updateInterfaceDeclaration; - /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ - const createTypeAliasDeclaration: typeof factory.createTypeAliasDeclaration; - /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ - const updateTypeAliasDeclaration: typeof factory.updateTypeAliasDeclaration; - /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */ - const createEnumDeclaration: typeof factory.createEnumDeclaration; - /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ - const updateEnumDeclaration: typeof factory.updateEnumDeclaration; - /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ - const createModuleDeclaration: typeof factory.createModuleDeclaration; - /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ - const updateModuleDeclaration: typeof factory.updateModuleDeclaration; - /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ - const createModuleBlock: typeof factory.createModuleBlock; - /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ - const updateModuleBlock: typeof factory.updateModuleBlock; - /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */ - const createCaseBlock: typeof factory.createCaseBlock; - /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */ - const updateCaseBlock: typeof factory.updateCaseBlock; - /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ - const createNamespaceExportDeclaration: typeof factory.createNamespaceExportDeclaration; - /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ - const updateNamespaceExportDeclaration: typeof factory.updateNamespaceExportDeclaration; - /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ - const createImportEqualsDeclaration: typeof factory.createImportEqualsDeclaration; - /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ - const updateImportEqualsDeclaration: typeof factory.updateImportEqualsDeclaration; - /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ - const createImportDeclaration: typeof factory.createImportDeclaration; - /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ - const updateImportDeclaration: typeof factory.updateImportDeclaration; - /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */ - const createNamespaceImport: typeof factory.createNamespaceImport; - /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */ - const updateNamespaceImport: typeof factory.updateNamespaceImport; - /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */ - const createNamedImports: typeof factory.createNamedImports; - /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */ - const updateNamedImports: typeof factory.updateNamedImports; - /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */ - const createImportSpecifier: typeof factory.createImportSpecifier; - /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */ - const updateImportSpecifier: typeof factory.updateImportSpecifier; - /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */ - const createExportAssignment: typeof factory.createExportAssignment; - /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */ - const updateExportAssignment: typeof factory.updateExportAssignment; - /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */ - const createNamedExports: typeof factory.createNamedExports; - /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */ - const updateNamedExports: typeof factory.updateNamedExports; - /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */ - const createExportSpecifier: typeof factory.createExportSpecifier; - /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */ - const updateExportSpecifier: typeof factory.updateExportSpecifier; - /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */ - const createExternalModuleReference: typeof factory.createExternalModuleReference; - /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */ - const updateExternalModuleReference: typeof factory.updateExternalModuleReference; - /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */ - const createJSDocTypeExpression: typeof factory.createJSDocTypeExpression; - /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */ - const createJSDocTypeTag: typeof factory.createJSDocTypeTag; - /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ - const createJSDocReturnTag: typeof factory.createJSDocReturnTag; - /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ - const createJSDocThisTag: typeof factory.createJSDocThisTag; - /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ - const createJSDocComment: typeof factory.createJSDocComment; - /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ - const createJSDocParameterTag: typeof factory.createJSDocParameterTag; - /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */ - const createJSDocClassTag: typeof factory.createJSDocClassTag; - /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */ - const createJSDocAugmentsTag: typeof factory.createJSDocAugmentsTag; - /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ - const createJSDocEnumTag: typeof factory.createJSDocEnumTag; - /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ - const createJSDocTemplateTag: typeof factory.createJSDocTemplateTag; - /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ - const createJSDocTypedefTag: typeof factory.createJSDocTypedefTag; - /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */ - const createJSDocCallbackTag: typeof factory.createJSDocCallbackTag; - /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */ - const createJSDocSignature: typeof factory.createJSDocSignature; - /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */ - const createJSDocPropertyTag: typeof factory.createJSDocPropertyTag; - /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */ - const createJSDocTypeLiteral: typeof factory.createJSDocTypeLiteral; - /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */ - const createJSDocImplementsTag: typeof factory.createJSDocImplementsTag; - /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */ - const createJSDocAuthorTag: typeof factory.createJSDocAuthorTag; - /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */ - const createJSDocPublicTag: typeof factory.createJSDocPublicTag; - /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */ - const createJSDocPrivateTag: typeof factory.createJSDocPrivateTag; - /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */ - const createJSDocProtectedTag: typeof factory.createJSDocProtectedTag; - /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */ - const createJSDocReadonlyTag: typeof factory.createJSDocReadonlyTag; - /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */ - const createJSDocTag: typeof factory.createJSDocUnknownTag; - /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */ - const createJsxElement: typeof factory.createJsxElement; - /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */ - const updateJsxElement: typeof factory.updateJsxElement; - /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ - const createJsxSelfClosingElement: typeof factory.createJsxSelfClosingElement; - /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ - const updateJsxSelfClosingElement: typeof factory.updateJsxSelfClosingElement; - /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */ - const createJsxOpeningElement: typeof factory.createJsxOpeningElement; - /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */ - const updateJsxOpeningElement: typeof factory.updateJsxOpeningElement; - /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */ - const createJsxClosingElement: typeof factory.createJsxClosingElement; - /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */ - const updateJsxClosingElement: typeof factory.updateJsxClosingElement; - /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */ - const createJsxFragment: typeof factory.createJsxFragment; - /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */ - const createJsxText: typeof factory.createJsxText; - /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */ - const updateJsxText: typeof factory.updateJsxText; - /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */ - const createJsxOpeningFragment: typeof factory.createJsxOpeningFragment; - /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */ - const createJsxJsxClosingFragment: typeof factory.createJsxJsxClosingFragment; - /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */ - const updateJsxFragment: typeof factory.updateJsxFragment; - /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */ - const createJsxAttribute: typeof factory.createJsxAttribute; - /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */ - const updateJsxAttribute: typeof factory.updateJsxAttribute; - /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */ - const createJsxAttributes: typeof factory.createJsxAttributes; - /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */ - const updateJsxAttributes: typeof factory.updateJsxAttributes; - /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ - const createJsxSpreadAttribute: typeof factory.createJsxSpreadAttribute; - /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ - const updateJsxSpreadAttribute: typeof factory.updateJsxSpreadAttribute; - /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */ - const createJsxExpression: typeof factory.createJsxExpression; - /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */ - const updateJsxExpression: typeof factory.updateJsxExpression; - /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */ - const createCaseClause: typeof factory.createCaseClause; - /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */ - const updateCaseClause: typeof factory.updateCaseClause; - /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */ - const createDefaultClause: typeof factory.createDefaultClause; - /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */ - const updateDefaultClause: typeof factory.updateDefaultClause; - /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */ - const createHeritageClause: typeof factory.createHeritageClause; - /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */ - const updateHeritageClause: typeof factory.updateHeritageClause; - /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */ - const createCatchClause: typeof factory.createCatchClause; - /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ - const updateCatchClause: typeof factory.updateCatchClause; - /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ - const createPropertyAssignment: typeof factory.createPropertyAssignment; - /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ - const updatePropertyAssignment: typeof factory.updatePropertyAssignment; - /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ - const createShorthandPropertyAssignment: typeof factory.createShorthandPropertyAssignment; - /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ - const updateShorthandPropertyAssignment: typeof factory.updateShorthandPropertyAssignment; - /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */ - const createSpreadAssignment: typeof factory.createSpreadAssignment; - /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ - const updateSpreadAssignment: typeof factory.updateSpreadAssignment; - /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ - const createEnumMember: typeof factory.createEnumMember; - /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ - const updateEnumMember: typeof factory.updateEnumMember; - /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ - const updateSourceFileNode: typeof factory.updateSourceFile; - /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */ - const createNotEmittedStatement: typeof factory.createNotEmittedStatement; - /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ - const createPartiallyEmittedExpression: typeof factory.createPartiallyEmittedExpression; - /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ - const updatePartiallyEmittedExpression: typeof factory.updatePartiallyEmittedExpression; - /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */ - const createCommaList: typeof factory.createCommaListExpression; - /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */ - const updateCommaList: typeof factory.updateCommaListExpression; - /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ - const createBundle: typeof factory.createBundle; - /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */ - const updateBundle: typeof factory.updateBundle; - /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */ - const createImmediatelyInvokedFunctionExpression: typeof factory.createImmediatelyInvokedFunctionExpression; - /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */ - const createImmediatelyInvokedArrowFunction: typeof factory.createImmediatelyInvokedArrowFunction; - /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */ - const createVoidZero: typeof factory.createVoidZero; - /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */ - const createExportDefault: typeof factory.createExportDefault; - /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */ - const createExternalModuleExport: typeof factory.createExternalModuleExport; - /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */ - const createNamespaceExport: typeof factory.createNamespaceExport; - /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */ - const updateNamespaceExport: typeof factory.updateNamespaceExport; - /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */ - const createToken: (kind: TKind) => Token; - /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */ - const createIdentifier: (text: string) => Identifier; - /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */ - const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier; - /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */ - const getGeneratedNameForNode: (node: Node | undefined) => Identifier; - /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */ - const createOptimisticUniqueName: (text: string) => Identifier; - /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */ - const createFileLevelUniqueName: (text: string) => Identifier; - /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */ - const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration; - /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ - const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode; - /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ - const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode; - /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */ - const createLiteral: { - (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral; - (value: number | PseudoBigInt): NumericLiteral; - (value: boolean): BooleanLiteral; - (value: string | number | PseudoBigInt | boolean): PrimaryExpression; - }; - /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */ - const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; - /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */ - const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; - /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */ - const createTypeOperatorNode: { - (type: TypeNode): TypeOperatorNode; - (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; - }; - /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */ - const createTaggedTemplate: { - (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; - (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; - }; - /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */ - const updateTaggedTemplate: { - (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; - (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; - }; - /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */ - const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression; - /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */ - const createConditional: { - (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression; - (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; - }; - /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */ - const createYield: { - (expression?: Expression | undefined): YieldExpression; - (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; - }; - /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */ - const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; - /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */ - const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; - /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */ - const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature; - /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */ - const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature; - /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ - const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; - /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ - const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; - /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */ - const createArrowFunction: { - (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; - (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; - }; - /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */ - const updateArrowFunction: { - (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; - (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; - }; - /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */ - const createVariableDeclaration: { - (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration; - (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - }; - /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */ - const updateVariableDeclaration: { - (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - }; - /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */ - const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause; - /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */ - const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause; - /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */ - const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration; - /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */ - const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration; - /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ - const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag; - /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */ - const createComma: (left: Expression, right: Expression) => Expression; - /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */ - const createLessThan: (left: Expression, right: Expression) => Expression; - /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */ - const createAssignment: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */ - const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */ - const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */ - const createAdd: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */ - const createSubtract: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */ - const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */ - const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */ - const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression; - /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */ - const createLogicalNot: (operand: Expression) => PrefixUnaryExpression; - /** @deprecated Use an appropriate `factory` method instead. */ - const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node; - /** - * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set. - * - * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be - * captured with respect to transformations. - * - * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`. - */ - const getMutableClone: (node: T) => T; - /** @deprecated Use `isTypeAssertionExpression` instead. */ - const isTypeAssertion: (node: Node) => node is TypeAssertion; - /** - * @deprecated Use `isMemberName` instead. - */ - const isIdentifierOrPrivateIdentifier: (node: Node) => node is MemberName; } export = ts; \ No newline at end of file diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index fe3bc49b583..d1ac3474de2 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -541,30 +541,6 @@ declare namespace ts { getLastToken(sourceFile?: SourceFile): Node | undefined; forEachChild(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined; } - interface Node { - /** - * @deprecated `decorators` has been removed from `Node` and merged with `modifiers` on the `Node` subtypes that support them. - * Use `ts.canHaveDecorators()` to test whether a `Node` can have decorators. - * Use `ts.getDecorators()` to get the decorators of a `Node`. - * - * For example: - * ```ts - * const decorators = ts.canHaveDecorators(node) ? ts.getDecorators(node) : undefined; - * ``` - */ - readonly decorators?: undefined; - /** - * @deprecated `modifiers` has been removed from `Node` and moved to the `Node` subtypes that support them. - * Use `ts.canHaveModifiers()` to test whether a `Node` can have modifiers. - * Use `ts.getModifiers()` to get the modifiers of a `Node`. - * - * For example: - * ```ts - * const modifiers = ts.canHaveModifiers(node) ? ts.getModifiers(node) : undefined; - * ``` - */ - readonly modifiers?: NodeArray | undefined; - } interface JSDocContainer extends Node { _jsdocContainerBrand: any; } @@ -765,10 +741,6 @@ declare namespace ts { readonly questionToken?: QuestionToken; readonly type?: TypeNode; } - interface PropertySignature { - /** @deprecated A property signature cannot have an initializer */ - readonly initializer?: Expression | undefined; - } interface PropertyDeclaration extends ClassElement, JSDocContainer { readonly kind: SyntaxKind.PropertyDeclaration; readonly parent: ClassLikeDeclaration; @@ -794,12 +766,6 @@ declare namespace ts { readonly name: PropertyName; readonly initializer: Expression; } - interface PropertyAssignment { - /** @deprecated A property assignment cannot have a question token */ - readonly questionToken?: QuestionToken | undefined; - /** @deprecated A property assignment cannot have an exclamation token */ - readonly exclamationToken?: ExclamationToken | undefined; - } interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.ShorthandPropertyAssignment; readonly parent: ObjectLiteralExpression; @@ -807,14 +773,6 @@ declare namespace ts { readonly equalsToken?: EqualsToken; readonly objectAssignmentInitializer?: Expression; } - interface ShorthandPropertyAssignment { - /** @deprecated A shorthand property assignment cannot have modifiers */ - readonly modifiers?: NodeArray | undefined; - /** @deprecated A shorthand property assignment cannot have a question token */ - readonly questionToken?: QuestionToken | undefined; - /** @deprecated A shorthand property assignment cannot have an exclamation token */ - readonly exclamationToken?: ExclamationToken | undefined; - } interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.SpreadAssignment; readonly parent: ObjectLiteralExpression; @@ -937,10 +895,6 @@ declare namespace ts { interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.FunctionType; } - interface FunctionTypeNode { - /** @deprecated A function type cannot have modifiers */ - readonly modifiers?: NodeArray | undefined; - } interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.ConstructorType; readonly modifiers?: NodeArray; @@ -3992,179 +3946,6 @@ declare namespace ts { createExternalModuleExport(exportName: Identifier): ExportDeclaration; restoreOuterExpressions(outerExpression: Expression | undefined, innerExpression: Expression, kinds?: OuterExpressionKinds): Expression; } - interface NodeFactory { - /** @deprecated Use the overload that accepts 'modifiers' */ - createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): ConstructorTypeNode; - /** @deprecated Use the overload that accepts 'modifiers' */ - updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode): ConstructorTypeNode; - } - interface NodeFactory { - createImportTypeNode(argument: TypeNode, assertions?: ImportTypeAssertionContainer, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - /** @deprecated Use the overload that accepts 'assertions' */ - createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode; - /** @deprecated Use the overload that accepts 'assertions' */ - updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier: EntityName | undefined, typeArguments: readonly TypeNode[] | undefined, isTypeOf?: boolean): ImportTypeNode; - } - interface NodeFactory { - /** @deprecated Use the overload that accepts 'modifiers' */ - createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration; - /** @deprecated Use the overload that accepts 'modifiers' */ - updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration; - } - interface NodeFactory { - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createParameterDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateParameterDeclaration(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createPropertyDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updatePropertyDeclaration(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createMethodDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateMethodDeclaration(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration; - /** - * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. - */ - createConstructorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - /** - * @deprecated This node does not support Decorators. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateConstructorDeclaration(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createGetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateGetAccessorDeclaration(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createSetAccessorDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateSetAccessorDeclaration(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - /** - * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. - */ - updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; - /** - * @deprecated Decorators and modifiers are no longer supported for this function. Callers should use an overload that does not accept the `decorators` and `modifiers` parameters. - */ - createClassStaticBlockDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassStaticBlockDeclaration(node: ClassStaticBlockDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, body: Block): ClassStaticBlockDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createClassExpression(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassExpression(node: ClassExpression, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - /** - * @deprecated Decorators have been combined with modifiers. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause?: AssertClause): ImportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression, assertClause: AssertClause | undefined): ImportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, assertClause?: AssertClause): ExportDeclaration; - /** - * @deprecated Decorators are no longer supported for this function. Callers should use an overload that does not accept a `decorators` parameter. - */ - updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isTypeOnly: boolean, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, assertClause: AssertClause | undefined): ExportDeclaration; - } interface CoreTransformationContext { readonly factory: NodeFactory; /** Gets the compiler options supplied to the transformer. */ @@ -7299,738 +7080,5 @@ declare namespace ts { * @param compilerOptions Optional compiler options. */ function transform(source: T | T[], transformers: TransformerFactory[], compilerOptions?: CompilerOptions): TransformationResult; - /** @deprecated Use `factory.createNodeArray` or the factory supplied by your transformation context instead. */ - const createNodeArray: typeof factory.createNodeArray; - /** @deprecated Use `factory.createNumericLiteral` or the factory supplied by your transformation context instead. */ - const createNumericLiteral: typeof factory.createNumericLiteral; - /** @deprecated Use `factory.createBigIntLiteral` or the factory supplied by your transformation context instead. */ - const createBigIntLiteral: typeof factory.createBigIntLiteral; - /** @deprecated Use `factory.createStringLiteral` or the factory supplied by your transformation context instead. */ - const createStringLiteral: typeof factory.createStringLiteral; - /** @deprecated Use `factory.createStringLiteralFromNode` or the factory supplied by your transformation context instead. */ - const createStringLiteralFromNode: typeof factory.createStringLiteralFromNode; - /** @deprecated Use `factory.createRegularExpressionLiteral` or the factory supplied by your transformation context instead. */ - const createRegularExpressionLiteral: typeof factory.createRegularExpressionLiteral; - /** @deprecated Use `factory.createLoopVariable` or the factory supplied by your transformation context instead. */ - const createLoopVariable: typeof factory.createLoopVariable; - /** @deprecated Use `factory.createUniqueName` or the factory supplied by your transformation context instead. */ - const createUniqueName: typeof factory.createUniqueName; - /** @deprecated Use `factory.createPrivateIdentifier` or the factory supplied by your transformation context instead. */ - const createPrivateIdentifier: typeof factory.createPrivateIdentifier; - /** @deprecated Use `factory.createSuper` or the factory supplied by your transformation context instead. */ - const createSuper: typeof factory.createSuper; - /** @deprecated Use `factory.createThis` or the factory supplied by your transformation context instead. */ - const createThis: typeof factory.createThis; - /** @deprecated Use `factory.createNull` or the factory supplied by your transformation context instead. */ - const createNull: typeof factory.createNull; - /** @deprecated Use `factory.createTrue` or the factory supplied by your transformation context instead. */ - const createTrue: typeof factory.createTrue; - /** @deprecated Use `factory.createFalse` or the factory supplied by your transformation context instead. */ - const createFalse: typeof factory.createFalse; - /** @deprecated Use `factory.createModifier` or the factory supplied by your transformation context instead. */ - const createModifier: typeof factory.createModifier; - /** @deprecated Use `factory.createModifiersFromModifierFlags` or the factory supplied by your transformation context instead. */ - const createModifiersFromModifierFlags: typeof factory.createModifiersFromModifierFlags; - /** @deprecated Use `factory.createQualifiedName` or the factory supplied by your transformation context instead. */ - const createQualifiedName: typeof factory.createQualifiedName; - /** @deprecated Use `factory.updateQualifiedName` or the factory supplied by your transformation context instead. */ - const updateQualifiedName: typeof factory.updateQualifiedName; - /** @deprecated Use `factory.createComputedPropertyName` or the factory supplied by your transformation context instead. */ - const createComputedPropertyName: typeof factory.createComputedPropertyName; - /** @deprecated Use `factory.updateComputedPropertyName` or the factory supplied by your transformation context instead. */ - const updateComputedPropertyName: typeof factory.updateComputedPropertyName; - /** @deprecated Use `factory.createTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ - const createTypeParameterDeclaration: typeof factory.createTypeParameterDeclaration; - /** @deprecated Use `factory.updateTypeParameterDeclaration` or the factory supplied by your transformation context instead. */ - const updateTypeParameterDeclaration: typeof factory.updateTypeParameterDeclaration; - /** @deprecated Use `factory.createParameterDeclaration` or the factory supplied by your transformation context instead. */ - const createParameter: typeof factory.createParameterDeclaration; - /** @deprecated Use `factory.updateParameterDeclaration` or the factory supplied by your transformation context instead. */ - const updateParameter: typeof factory.updateParameterDeclaration; - /** @deprecated Use `factory.createDecorator` or the factory supplied by your transformation context instead. */ - const createDecorator: typeof factory.createDecorator; - /** @deprecated Use `factory.updateDecorator` or the factory supplied by your transformation context instead. */ - const updateDecorator: typeof factory.updateDecorator; - /** @deprecated Use `factory.createPropertyDeclaration` or the factory supplied by your transformation context instead. */ - const createProperty: typeof factory.createPropertyDeclaration; - /** @deprecated Use `factory.updatePropertyDeclaration` or the factory supplied by your transformation context instead. */ - const updateProperty: typeof factory.updatePropertyDeclaration; - /** @deprecated Use `factory.createMethodDeclaration` or the factory supplied by your transformation context instead. */ - const createMethod: typeof factory.createMethodDeclaration; - /** @deprecated Use `factory.updateMethodDeclaration` or the factory supplied by your transformation context instead. */ - const updateMethod: typeof factory.updateMethodDeclaration; - /** @deprecated Use `factory.createConstructorDeclaration` or the factory supplied by your transformation context instead. */ - const createConstructor: typeof factory.createConstructorDeclaration; - /** @deprecated Use `factory.updateConstructorDeclaration` or the factory supplied by your transformation context instead. */ - const updateConstructor: typeof factory.updateConstructorDeclaration; - /** @deprecated Use `factory.createGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const createGetAccessor: typeof factory.createGetAccessorDeclaration; - /** @deprecated Use `factory.updateGetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const updateGetAccessor: typeof factory.updateGetAccessorDeclaration; - /** @deprecated Use `factory.createSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const createSetAccessor: typeof factory.createSetAccessorDeclaration; - /** @deprecated Use `factory.updateSetAccessorDeclaration` or the factory supplied by your transformation context instead. */ - const updateSetAccessor: typeof factory.updateSetAccessorDeclaration; - /** @deprecated Use `factory.createCallSignature` or the factory supplied by your transformation context instead. */ - const createCallSignature: typeof factory.createCallSignature; - /** @deprecated Use `factory.updateCallSignature` or the factory supplied by your transformation context instead. */ - const updateCallSignature: typeof factory.updateCallSignature; - /** @deprecated Use `factory.createConstructSignature` or the factory supplied by your transformation context instead. */ - const createConstructSignature: typeof factory.createConstructSignature; - /** @deprecated Use `factory.updateConstructSignature` or the factory supplied by your transformation context instead. */ - const updateConstructSignature: typeof factory.updateConstructSignature; - /** @deprecated Use `factory.updateIndexSignature` or the factory supplied by your transformation context instead. */ - const updateIndexSignature: typeof factory.updateIndexSignature; - /** @deprecated Use `factory.createKeywordTypeNode` or the factory supplied by your transformation context instead. */ - const createKeywordTypeNode: typeof factory.createKeywordTypeNode; - /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ - const createTypePredicateNodeWithModifier: typeof factory.createTypePredicateNode; - /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ - const updateTypePredicateNodeWithModifier: typeof factory.updateTypePredicateNode; - /** @deprecated Use `factory.createTypeReferenceNode` or the factory supplied by your transformation context instead. */ - const createTypeReferenceNode: typeof factory.createTypeReferenceNode; - /** @deprecated Use `factory.updateTypeReferenceNode` or the factory supplied by your transformation context instead. */ - const updateTypeReferenceNode: typeof factory.updateTypeReferenceNode; - /** @deprecated Use `factory.createFunctionTypeNode` or the factory supplied by your transformation context instead. */ - const createFunctionTypeNode: typeof factory.createFunctionTypeNode; - /** @deprecated Use `factory.updateFunctionTypeNode` or the factory supplied by your transformation context instead. */ - const updateFunctionTypeNode: typeof factory.updateFunctionTypeNode; - /** @deprecated Use `factory.createConstructorTypeNode` or the factory supplied by your transformation context instead. */ - const createConstructorTypeNode: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => ConstructorTypeNode; - /** @deprecated Use `factory.updateConstructorTypeNode` or the factory supplied by your transformation context instead. */ - const updateConstructorTypeNode: (node: ConstructorTypeNode, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode) => ConstructorTypeNode; - /** @deprecated Use `factory.createTypeQueryNode` or the factory supplied by your transformation context instead. */ - const createTypeQueryNode: typeof factory.createTypeQueryNode; - /** @deprecated Use `factory.updateTypeQueryNode` or the factory supplied by your transformation context instead. */ - const updateTypeQueryNode: typeof factory.updateTypeQueryNode; - /** @deprecated Use `factory.createTypeLiteralNode` or the factory supplied by your transformation context instead. */ - const createTypeLiteralNode: typeof factory.createTypeLiteralNode; - /** @deprecated Use `factory.updateTypeLiteralNode` or the factory supplied by your transformation context instead. */ - const updateTypeLiteralNode: typeof factory.updateTypeLiteralNode; - /** @deprecated Use `factory.createArrayTypeNode` or the factory supplied by your transformation context instead. */ - const createArrayTypeNode: typeof factory.createArrayTypeNode; - /** @deprecated Use `factory.updateArrayTypeNode` or the factory supplied by your transformation context instead. */ - const updateArrayTypeNode: typeof factory.updateArrayTypeNode; - /** @deprecated Use `factory.createTupleTypeNode` or the factory supplied by your transformation context instead. */ - const createTupleTypeNode: typeof factory.createTupleTypeNode; - /** @deprecated Use `factory.updateTupleTypeNode` or the factory supplied by your transformation context instead. */ - const updateTupleTypeNode: typeof factory.updateTupleTypeNode; - /** @deprecated Use `factory.createOptionalTypeNode` or the factory supplied by your transformation context instead. */ - const createOptionalTypeNode: typeof factory.createOptionalTypeNode; - /** @deprecated Use `factory.updateOptionalTypeNode` or the factory supplied by your transformation context instead. */ - const updateOptionalTypeNode: typeof factory.updateOptionalTypeNode; - /** @deprecated Use `factory.createRestTypeNode` or the factory supplied by your transformation context instead. */ - const createRestTypeNode: typeof factory.createRestTypeNode; - /** @deprecated Use `factory.updateRestTypeNode` or the factory supplied by your transformation context instead. */ - const updateRestTypeNode: typeof factory.updateRestTypeNode; - /** @deprecated Use `factory.createUnionTypeNode` or the factory supplied by your transformation context instead. */ - const createUnionTypeNode: typeof factory.createUnionTypeNode; - /** @deprecated Use `factory.updateUnionTypeNode` or the factory supplied by your transformation context instead. */ - const updateUnionTypeNode: typeof factory.updateUnionTypeNode; - /** @deprecated Use `factory.createIntersectionTypeNode` or the factory supplied by your transformation context instead. */ - const createIntersectionTypeNode: typeof factory.createIntersectionTypeNode; - /** @deprecated Use `factory.updateIntersectionTypeNode` or the factory supplied by your transformation context instead. */ - const updateIntersectionTypeNode: typeof factory.updateIntersectionTypeNode; - /** @deprecated Use `factory.createConditionalTypeNode` or the factory supplied by your transformation context instead. */ - const createConditionalTypeNode: typeof factory.createConditionalTypeNode; - /** @deprecated Use `factory.updateConditionalTypeNode` or the factory supplied by your transformation context instead. */ - const updateConditionalTypeNode: typeof factory.updateConditionalTypeNode; - /** @deprecated Use `factory.createInferTypeNode` or the factory supplied by your transformation context instead. */ - const createInferTypeNode: typeof factory.createInferTypeNode; - /** @deprecated Use `factory.updateInferTypeNode` or the factory supplied by your transformation context instead. */ - const updateInferTypeNode: typeof factory.updateInferTypeNode; - /** @deprecated Use `factory.createImportTypeNode` or the factory supplied by your transformation context instead. */ - const createImportTypeNode: typeof factory.createImportTypeNode; - /** @deprecated Use `factory.updateImportTypeNode` or the factory supplied by your transformation context instead. */ - const updateImportTypeNode: typeof factory.updateImportTypeNode; - /** @deprecated Use `factory.createParenthesizedType` or the factory supplied by your transformation context instead. */ - const createParenthesizedType: typeof factory.createParenthesizedType; - /** @deprecated Use `factory.updateParenthesizedType` or the factory supplied by your transformation context instead. */ - const updateParenthesizedType: typeof factory.updateParenthesizedType; - /** @deprecated Use `factory.createThisTypeNode` or the factory supplied by your transformation context instead. */ - const createThisTypeNode: typeof factory.createThisTypeNode; - /** @deprecated Use `factory.updateTypeOperatorNode` or the factory supplied by your transformation context instead. */ - const updateTypeOperatorNode: typeof factory.updateTypeOperatorNode; - /** @deprecated Use `factory.createIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ - const createIndexedAccessTypeNode: typeof factory.createIndexedAccessTypeNode; - /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ - const updateIndexedAccessTypeNode: typeof factory.updateIndexedAccessTypeNode; - /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ - const createMappedTypeNode: typeof factory.createMappedTypeNode; - /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ - const updateMappedTypeNode: typeof factory.updateMappedTypeNode; - /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ - const createLiteralTypeNode: typeof factory.createLiteralTypeNode; - /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ - const updateLiteralTypeNode: typeof factory.updateLiteralTypeNode; - /** @deprecated Use `factory.createObjectBindingPattern` or the factory supplied by your transformation context instead. */ - const createObjectBindingPattern: typeof factory.createObjectBindingPattern; - /** @deprecated Use `factory.updateObjectBindingPattern` or the factory supplied by your transformation context instead. */ - const updateObjectBindingPattern: typeof factory.updateObjectBindingPattern; - /** @deprecated Use `factory.createArrayBindingPattern` or the factory supplied by your transformation context instead. */ - const createArrayBindingPattern: typeof factory.createArrayBindingPattern; - /** @deprecated Use `factory.updateArrayBindingPattern` or the factory supplied by your transformation context instead. */ - const updateArrayBindingPattern: typeof factory.updateArrayBindingPattern; - /** @deprecated Use `factory.createBindingElement` or the factory supplied by your transformation context instead. */ - const createBindingElement: typeof factory.createBindingElement; - /** @deprecated Use `factory.updateBindingElement` or the factory supplied by your transformation context instead. */ - const updateBindingElement: typeof factory.updateBindingElement; - /** @deprecated Use `factory.createArrayLiteralExpression` or the factory supplied by your transformation context instead. */ - const createArrayLiteral: typeof factory.createArrayLiteralExpression; - /** @deprecated Use `factory.updateArrayLiteralExpression` or the factory supplied by your transformation context instead. */ - const updateArrayLiteral: typeof factory.updateArrayLiteralExpression; - /** @deprecated Use `factory.createObjectLiteralExpression` or the factory supplied by your transformation context instead. */ - const createObjectLiteral: typeof factory.createObjectLiteralExpression; - /** @deprecated Use `factory.updateObjectLiteralExpression` or the factory supplied by your transformation context instead. */ - const updateObjectLiteral: typeof factory.updateObjectLiteralExpression; - /** @deprecated Use `factory.createPropertyAccessExpression` or the factory supplied by your transformation context instead. */ - const createPropertyAccess: typeof factory.createPropertyAccessExpression; - /** @deprecated Use `factory.updatePropertyAccessExpression` or the factory supplied by your transformation context instead. */ - const updatePropertyAccess: typeof factory.updatePropertyAccessExpression; - /** @deprecated Use `factory.createPropertyAccessChain` or the factory supplied by your transformation context instead. */ - const createPropertyAccessChain: typeof factory.createPropertyAccessChain; - /** @deprecated Use `factory.updatePropertyAccessChain` or the factory supplied by your transformation context instead. */ - const updatePropertyAccessChain: typeof factory.updatePropertyAccessChain; - /** @deprecated Use `factory.createElementAccessExpression` or the factory supplied by your transformation context instead. */ - const createElementAccess: typeof factory.createElementAccessExpression; - /** @deprecated Use `factory.updateElementAccessExpression` or the factory supplied by your transformation context instead. */ - const updateElementAccess: typeof factory.updateElementAccessExpression; - /** @deprecated Use `factory.createElementAccessChain` or the factory supplied by your transformation context instead. */ - const createElementAccessChain: typeof factory.createElementAccessChain; - /** @deprecated Use `factory.updateElementAccessChain` or the factory supplied by your transformation context instead. */ - const updateElementAccessChain: typeof factory.updateElementAccessChain; - /** @deprecated Use `factory.createCallExpression` or the factory supplied by your transformation context instead. */ - const createCall: typeof factory.createCallExpression; - /** @deprecated Use `factory.updateCallExpression` or the factory supplied by your transformation context instead. */ - const updateCall: typeof factory.updateCallExpression; - /** @deprecated Use `factory.createCallChain` or the factory supplied by your transformation context instead. */ - const createCallChain: typeof factory.createCallChain; - /** @deprecated Use `factory.updateCallChain` or the factory supplied by your transformation context instead. */ - const updateCallChain: typeof factory.updateCallChain; - /** @deprecated Use `factory.createNewExpression` or the factory supplied by your transformation context instead. */ - const createNew: typeof factory.createNewExpression; - /** @deprecated Use `factory.updateNewExpression` or the factory supplied by your transformation context instead. */ - const updateNew: typeof factory.updateNewExpression; - /** @deprecated Use `factory.createTypeAssertion` or the factory supplied by your transformation context instead. */ - const createTypeAssertion: typeof factory.createTypeAssertion; - /** @deprecated Use `factory.updateTypeAssertion` or the factory supplied by your transformation context instead. */ - const updateTypeAssertion: typeof factory.updateTypeAssertion; - /** @deprecated Use `factory.createParenthesizedExpression` or the factory supplied by your transformation context instead. */ - const createParen: typeof factory.createParenthesizedExpression; - /** @deprecated Use `factory.updateParenthesizedExpression` or the factory supplied by your transformation context instead. */ - const updateParen: typeof factory.updateParenthesizedExpression; - /** @deprecated Use `factory.createFunctionExpression` or the factory supplied by your transformation context instead. */ - const createFunctionExpression: typeof factory.createFunctionExpression; - /** @deprecated Use `factory.updateFunctionExpression` or the factory supplied by your transformation context instead. */ - const updateFunctionExpression: typeof factory.updateFunctionExpression; - /** @deprecated Use `factory.createDeleteExpression` or the factory supplied by your transformation context instead. */ - const createDelete: typeof factory.createDeleteExpression; - /** @deprecated Use `factory.updateDeleteExpression` or the factory supplied by your transformation context instead. */ - const updateDelete: typeof factory.updateDeleteExpression; - /** @deprecated Use `factory.createTypeOfExpression` or the factory supplied by your transformation context instead. */ - const createTypeOf: typeof factory.createTypeOfExpression; - /** @deprecated Use `factory.updateTypeOfExpression` or the factory supplied by your transformation context instead. */ - const updateTypeOf: typeof factory.updateTypeOfExpression; - /** @deprecated Use `factory.createVoidExpression` or the factory supplied by your transformation context instead. */ - const createVoid: typeof factory.createVoidExpression; - /** @deprecated Use `factory.updateVoidExpression` or the factory supplied by your transformation context instead. */ - const updateVoid: typeof factory.updateVoidExpression; - /** @deprecated Use `factory.createAwaitExpression` or the factory supplied by your transformation context instead. */ - const createAwait: typeof factory.createAwaitExpression; - /** @deprecated Use `factory.updateAwaitExpression` or the factory supplied by your transformation context instead. */ - const updateAwait: typeof factory.updateAwaitExpression; - /** @deprecated Use `factory.createPrefixExpression` or the factory supplied by your transformation context instead. */ - const createPrefix: typeof factory.createPrefixUnaryExpression; - /** @deprecated Use `factory.updatePrefixExpression` or the factory supplied by your transformation context instead. */ - const updatePrefix: typeof factory.updatePrefixUnaryExpression; - /** @deprecated Use `factory.createPostfixUnaryExpression` or the factory supplied by your transformation context instead. */ - const createPostfix: typeof factory.createPostfixUnaryExpression; - /** @deprecated Use `factory.updatePostfixUnaryExpression` or the factory supplied by your transformation context instead. */ - const updatePostfix: typeof factory.updatePostfixUnaryExpression; - /** @deprecated Use `factory.createBinaryExpression` or the factory supplied by your transformation context instead. */ - const createBinary: typeof factory.createBinaryExpression; - /** @deprecated Use `factory.updateConditionalExpression` or the factory supplied by your transformation context instead. */ - const updateConditional: typeof factory.updateConditionalExpression; - /** @deprecated Use `factory.createTemplateExpression` or the factory supplied by your transformation context instead. */ - const createTemplateExpression: typeof factory.createTemplateExpression; - /** @deprecated Use `factory.updateTemplateExpression` or the factory supplied by your transformation context instead. */ - const updateTemplateExpression: typeof factory.updateTemplateExpression; - /** @deprecated Use `factory.createTemplateHead` or the factory supplied by your transformation context instead. */ - const createTemplateHead: typeof factory.createTemplateHead; - /** @deprecated Use `factory.createTemplateMiddle` or the factory supplied by your transformation context instead. */ - const createTemplateMiddle: typeof factory.createTemplateMiddle; - /** @deprecated Use `factory.createTemplateTail` or the factory supplied by your transformation context instead. */ - const createTemplateTail: typeof factory.createTemplateTail; - /** @deprecated Use `factory.createNoSubstitutionTemplateLiteral` or the factory supplied by your transformation context instead. */ - const createNoSubstitutionTemplateLiteral: typeof factory.createNoSubstitutionTemplateLiteral; - /** @deprecated Use `factory.updateYieldExpression` or the factory supplied by your transformation context instead. */ - const updateYield: typeof factory.updateYieldExpression; - /** @deprecated Use `factory.createSpreadExpression` or the factory supplied by your transformation context instead. */ - const createSpread: typeof factory.createSpreadElement; - /** @deprecated Use `factory.updateSpreadExpression` or the factory supplied by your transformation context instead. */ - const updateSpread: typeof factory.updateSpreadElement; - /** @deprecated Use `factory.createOmittedExpression` or the factory supplied by your transformation context instead. */ - const createOmittedExpression: typeof factory.createOmittedExpression; - /** @deprecated Use `factory.createAsExpression` or the factory supplied by your transformation context instead. */ - const createAsExpression: typeof factory.createAsExpression; - /** @deprecated Use `factory.updateAsExpression` or the factory supplied by your transformation context instead. */ - const updateAsExpression: typeof factory.updateAsExpression; - /** @deprecated Use `factory.createNonNullExpression` or the factory supplied by your transformation context instead. */ - const createNonNullExpression: typeof factory.createNonNullExpression; - /** @deprecated Use `factory.updateNonNullExpression` or the factory supplied by your transformation context instead. */ - const updateNonNullExpression: typeof factory.updateNonNullExpression; - /** @deprecated Use `factory.createNonNullChain` or the factory supplied by your transformation context instead. */ - const createNonNullChain: typeof factory.createNonNullChain; - /** @deprecated Use `factory.updateNonNullChain` or the factory supplied by your transformation context instead. */ - const updateNonNullChain: typeof factory.updateNonNullChain; - /** @deprecated Use `factory.createMetaProperty` or the factory supplied by your transformation context instead. */ - const createMetaProperty: typeof factory.createMetaProperty; - /** @deprecated Use `factory.updateMetaProperty` or the factory supplied by your transformation context instead. */ - const updateMetaProperty: typeof factory.updateMetaProperty; - /** @deprecated Use `factory.createTemplateSpan` or the factory supplied by your transformation context instead. */ - const createTemplateSpan: typeof factory.createTemplateSpan; - /** @deprecated Use `factory.updateTemplateSpan` or the factory supplied by your transformation context instead. */ - const updateTemplateSpan: typeof factory.updateTemplateSpan; - /** @deprecated Use `factory.createSemicolonClassElement` or the factory supplied by your transformation context instead. */ - const createSemicolonClassElement: typeof factory.createSemicolonClassElement; - /** @deprecated Use `factory.createBlock` or the factory supplied by your transformation context instead. */ - const createBlock: typeof factory.createBlock; - /** @deprecated Use `factory.updateBlock` or the factory supplied by your transformation context instead. */ - const updateBlock: typeof factory.updateBlock; - /** @deprecated Use `factory.createVariableStatement` or the factory supplied by your transformation context instead. */ - const createVariableStatement: typeof factory.createVariableStatement; - /** @deprecated Use `factory.updateVariableStatement` or the factory supplied by your transformation context instead. */ - const updateVariableStatement: typeof factory.updateVariableStatement; - /** @deprecated Use `factory.createEmptyStatement` or the factory supplied by your transformation context instead. */ - const createEmptyStatement: typeof factory.createEmptyStatement; - /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ - const createExpressionStatement: typeof factory.createExpressionStatement; - /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ - const updateExpressionStatement: typeof factory.updateExpressionStatement; - /** @deprecated Use `factory.createExpressionStatement` or the factory supplied by your transformation context instead. */ - const createStatement: typeof factory.createExpressionStatement; - /** @deprecated Use `factory.updateExpressionStatement` or the factory supplied by your transformation context instead. */ - const updateStatement: typeof factory.updateExpressionStatement; - /** @deprecated Use `factory.createIfStatement` or the factory supplied by your transformation context instead. */ - const createIf: typeof factory.createIfStatement; - /** @deprecated Use `factory.updateIfStatement` or the factory supplied by your transformation context instead. */ - const updateIf: typeof factory.updateIfStatement; - /** @deprecated Use `factory.createDoStatement` or the factory supplied by your transformation context instead. */ - const createDo: typeof factory.createDoStatement; - /** @deprecated Use `factory.updateDoStatement` or the factory supplied by your transformation context instead. */ - const updateDo: typeof factory.updateDoStatement; - /** @deprecated Use `factory.createWhileStatement` or the factory supplied by your transformation context instead. */ - const createWhile: typeof factory.createWhileStatement; - /** @deprecated Use `factory.updateWhileStatement` or the factory supplied by your transformation context instead. */ - const updateWhile: typeof factory.updateWhileStatement; - /** @deprecated Use `factory.createForStatement` or the factory supplied by your transformation context instead. */ - const createFor: typeof factory.createForStatement; - /** @deprecated Use `factory.updateForStatement` or the factory supplied by your transformation context instead. */ - const updateFor: typeof factory.updateForStatement; - /** @deprecated Use `factory.createForInStatement` or the factory supplied by your transformation context instead. */ - const createForIn: typeof factory.createForInStatement; - /** @deprecated Use `factory.updateForInStatement` or the factory supplied by your transformation context instead. */ - const updateForIn: typeof factory.updateForInStatement; - /** @deprecated Use `factory.createForOfStatement` or the factory supplied by your transformation context instead. */ - const createForOf: typeof factory.createForOfStatement; - /** @deprecated Use `factory.updateForOfStatement` or the factory supplied by your transformation context instead. */ - const updateForOf: typeof factory.updateForOfStatement; - /** @deprecated Use `factory.createContinueStatement` or the factory supplied by your transformation context instead. */ - const createContinue: typeof factory.createContinueStatement; - /** @deprecated Use `factory.updateContinueStatement` or the factory supplied by your transformation context instead. */ - const updateContinue: typeof factory.updateContinueStatement; - /** @deprecated Use `factory.createBreakStatement` or the factory supplied by your transformation context instead. */ - const createBreak: typeof factory.createBreakStatement; - /** @deprecated Use `factory.updateBreakStatement` or the factory supplied by your transformation context instead. */ - const updateBreak: typeof factory.updateBreakStatement; - /** @deprecated Use `factory.createReturnStatement` or the factory supplied by your transformation context instead. */ - const createReturn: typeof factory.createReturnStatement; - /** @deprecated Use `factory.updateReturnStatement` or the factory supplied by your transformation context instead. */ - const updateReturn: typeof factory.updateReturnStatement; - /** @deprecated Use `factory.createWithStatement` or the factory supplied by your transformation context instead. */ - const createWith: typeof factory.createWithStatement; - /** @deprecated Use `factory.updateWithStatement` or the factory supplied by your transformation context instead. */ - const updateWith: typeof factory.updateWithStatement; - /** @deprecated Use `factory.createSwitchStatement` or the factory supplied by your transformation context instead. */ - const createSwitch: typeof factory.createSwitchStatement; - /** @deprecated Use `factory.updateSwitchStatement` or the factory supplied by your transformation context instead. */ - const updateSwitch: typeof factory.updateSwitchStatement; - /** @deprecated Use `factory.createLabelStatement` or the factory supplied by your transformation context instead. */ - const createLabel: typeof factory.createLabeledStatement; - /** @deprecated Use `factory.updateLabelStatement` or the factory supplied by your transformation context instead. */ - const updateLabel: typeof factory.updateLabeledStatement; - /** @deprecated Use `factory.createThrowStatement` or the factory supplied by your transformation context instead. */ - const createThrow: typeof factory.createThrowStatement; - /** @deprecated Use `factory.updateThrowStatement` or the factory supplied by your transformation context instead. */ - const updateThrow: typeof factory.updateThrowStatement; - /** @deprecated Use `factory.createTryStatement` or the factory supplied by your transformation context instead. */ - const createTry: typeof factory.createTryStatement; - /** @deprecated Use `factory.updateTryStatement` or the factory supplied by your transformation context instead. */ - const updateTry: typeof factory.updateTryStatement; - /** @deprecated Use `factory.createDebuggerStatement` or the factory supplied by your transformation context instead. */ - const createDebuggerStatement: typeof factory.createDebuggerStatement; - /** @deprecated Use `factory.createVariableDeclarationList` or the factory supplied by your transformation context instead. */ - const createVariableDeclarationList: typeof factory.createVariableDeclarationList; - /** @deprecated Use `factory.updateVariableDeclarationList` or the factory supplied by your transformation context instead. */ - const updateVariableDeclarationList: typeof factory.updateVariableDeclarationList; - /** @deprecated Use `factory.createFunctionDeclaration` or the factory supplied by your transformation context instead. */ - const createFunctionDeclaration: typeof factory.createFunctionDeclaration; - /** @deprecated Use `factory.updateFunctionDeclaration` or the factory supplied by your transformation context instead. */ - const updateFunctionDeclaration: typeof factory.updateFunctionDeclaration; - /** @deprecated Use `factory.createClassDeclaration` or the factory supplied by your transformation context instead. */ - const createClassDeclaration: typeof factory.createClassDeclaration; - /** @deprecated Use `factory.updateClassDeclaration` or the factory supplied by your transformation context instead. */ - const updateClassDeclaration: typeof factory.updateClassDeclaration; - /** @deprecated Use `factory.createInterfaceDeclaration` or the factory supplied by your transformation context instead. */ - const createInterfaceDeclaration: typeof factory.createInterfaceDeclaration; - /** @deprecated Use `factory.updateInterfaceDeclaration` or the factory supplied by your transformation context instead. */ - const updateInterfaceDeclaration: typeof factory.updateInterfaceDeclaration; - /** @deprecated Use `factory.createTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ - const createTypeAliasDeclaration: typeof factory.createTypeAliasDeclaration; - /** @deprecated Use `factory.updateTypeAliasDeclaration` or the factory supplied by your transformation context instead. */ - const updateTypeAliasDeclaration: typeof factory.updateTypeAliasDeclaration; - /** @deprecated Use `factory.createEnumDeclaration` or the factory supplied by your transformation context instead. */ - const createEnumDeclaration: typeof factory.createEnumDeclaration; - /** @deprecated Use `factory.updateEnumDeclaration` or the factory supplied by your transformation context instead. */ - const updateEnumDeclaration: typeof factory.updateEnumDeclaration; - /** @deprecated Use `factory.createModuleDeclaration` or the factory supplied by your transformation context instead. */ - const createModuleDeclaration: typeof factory.createModuleDeclaration; - /** @deprecated Use `factory.updateModuleDeclaration` or the factory supplied by your transformation context instead. */ - const updateModuleDeclaration: typeof factory.updateModuleDeclaration; - /** @deprecated Use `factory.createModuleBlock` or the factory supplied by your transformation context instead. */ - const createModuleBlock: typeof factory.createModuleBlock; - /** @deprecated Use `factory.updateModuleBlock` or the factory supplied by your transformation context instead. */ - const updateModuleBlock: typeof factory.updateModuleBlock; - /** @deprecated Use `factory.createCaseBlock` or the factory supplied by your transformation context instead. */ - const createCaseBlock: typeof factory.createCaseBlock; - /** @deprecated Use `factory.updateCaseBlock` or the factory supplied by your transformation context instead. */ - const updateCaseBlock: typeof factory.updateCaseBlock; - /** @deprecated Use `factory.createNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ - const createNamespaceExportDeclaration: typeof factory.createNamespaceExportDeclaration; - /** @deprecated Use `factory.updateNamespaceExportDeclaration` or the factory supplied by your transformation context instead. */ - const updateNamespaceExportDeclaration: typeof factory.updateNamespaceExportDeclaration; - /** @deprecated Use `factory.createImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ - const createImportEqualsDeclaration: typeof factory.createImportEqualsDeclaration; - /** @deprecated Use `factory.updateImportEqualsDeclaration` or the factory supplied by your transformation context instead. */ - const updateImportEqualsDeclaration: typeof factory.updateImportEqualsDeclaration; - /** @deprecated Use `factory.createImportDeclaration` or the factory supplied by your transformation context instead. */ - const createImportDeclaration: typeof factory.createImportDeclaration; - /** @deprecated Use `factory.updateImportDeclaration` or the factory supplied by your transformation context instead. */ - const updateImportDeclaration: typeof factory.updateImportDeclaration; - /** @deprecated Use `factory.createNamespaceImport` or the factory supplied by your transformation context instead. */ - const createNamespaceImport: typeof factory.createNamespaceImport; - /** @deprecated Use `factory.updateNamespaceImport` or the factory supplied by your transformation context instead. */ - const updateNamespaceImport: typeof factory.updateNamespaceImport; - /** @deprecated Use `factory.createNamedImports` or the factory supplied by your transformation context instead. */ - const createNamedImports: typeof factory.createNamedImports; - /** @deprecated Use `factory.updateNamedImports` or the factory supplied by your transformation context instead. */ - const updateNamedImports: typeof factory.updateNamedImports; - /** @deprecated Use `factory.createImportSpecifier` or the factory supplied by your transformation context instead. */ - const createImportSpecifier: typeof factory.createImportSpecifier; - /** @deprecated Use `factory.updateImportSpecifier` or the factory supplied by your transformation context instead. */ - const updateImportSpecifier: typeof factory.updateImportSpecifier; - /** @deprecated Use `factory.createExportAssignment` or the factory supplied by your transformation context instead. */ - const createExportAssignment: typeof factory.createExportAssignment; - /** @deprecated Use `factory.updateExportAssignment` or the factory supplied by your transformation context instead. */ - const updateExportAssignment: typeof factory.updateExportAssignment; - /** @deprecated Use `factory.createNamedExports` or the factory supplied by your transformation context instead. */ - const createNamedExports: typeof factory.createNamedExports; - /** @deprecated Use `factory.updateNamedExports` or the factory supplied by your transformation context instead. */ - const updateNamedExports: typeof factory.updateNamedExports; - /** @deprecated Use `factory.createExportSpecifier` or the factory supplied by your transformation context instead. */ - const createExportSpecifier: typeof factory.createExportSpecifier; - /** @deprecated Use `factory.updateExportSpecifier` or the factory supplied by your transformation context instead. */ - const updateExportSpecifier: typeof factory.updateExportSpecifier; - /** @deprecated Use `factory.createExternalModuleReference` or the factory supplied by your transformation context instead. */ - const createExternalModuleReference: typeof factory.createExternalModuleReference; - /** @deprecated Use `factory.updateExternalModuleReference` or the factory supplied by your transformation context instead. */ - const updateExternalModuleReference: typeof factory.updateExternalModuleReference; - /** @deprecated Use `factory.createJSDocTypeExpression` or the factory supplied by your transformation context instead. */ - const createJSDocTypeExpression: typeof factory.createJSDocTypeExpression; - /** @deprecated Use `factory.createJSDocTypeTag` or the factory supplied by your transformation context instead. */ - const createJSDocTypeTag: typeof factory.createJSDocTypeTag; - /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ - const createJSDocReturnTag: typeof factory.createJSDocReturnTag; - /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ - const createJSDocThisTag: typeof factory.createJSDocThisTag; - /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ - const createJSDocComment: typeof factory.createJSDocComment; - /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ - const createJSDocParameterTag: typeof factory.createJSDocParameterTag; - /** @deprecated Use `factory.createJSDocClassTag` or the factory supplied by your transformation context instead. */ - const createJSDocClassTag: typeof factory.createJSDocClassTag; - /** @deprecated Use `factory.createJSDocAugmentsTag` or the factory supplied by your transformation context instead. */ - const createJSDocAugmentsTag: typeof factory.createJSDocAugmentsTag; - /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ - const createJSDocEnumTag: typeof factory.createJSDocEnumTag; - /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ - const createJSDocTemplateTag: typeof factory.createJSDocTemplateTag; - /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ - const createJSDocTypedefTag: typeof factory.createJSDocTypedefTag; - /** @deprecated Use `factory.createJSDocCallbackTag` or the factory supplied by your transformation context instead. */ - const createJSDocCallbackTag: typeof factory.createJSDocCallbackTag; - /** @deprecated Use `factory.createJSDocSignature` or the factory supplied by your transformation context instead. */ - const createJSDocSignature: typeof factory.createJSDocSignature; - /** @deprecated Use `factory.createJSDocPropertyTag` or the factory supplied by your transformation context instead. */ - const createJSDocPropertyTag: typeof factory.createJSDocPropertyTag; - /** @deprecated Use `factory.createJSDocTypeLiteral` or the factory supplied by your transformation context instead. */ - const createJSDocTypeLiteral: typeof factory.createJSDocTypeLiteral; - /** @deprecated Use `factory.createJSDocImplementsTag` or the factory supplied by your transformation context instead. */ - const createJSDocImplementsTag: typeof factory.createJSDocImplementsTag; - /** @deprecated Use `factory.createJSDocAuthorTag` or the factory supplied by your transformation context instead. */ - const createJSDocAuthorTag: typeof factory.createJSDocAuthorTag; - /** @deprecated Use `factory.createJSDocPublicTag` or the factory supplied by your transformation context instead. */ - const createJSDocPublicTag: typeof factory.createJSDocPublicTag; - /** @deprecated Use `factory.createJSDocPrivateTag` or the factory supplied by your transformation context instead. */ - const createJSDocPrivateTag: typeof factory.createJSDocPrivateTag; - /** @deprecated Use `factory.createJSDocProtectedTag` or the factory supplied by your transformation context instead. */ - const createJSDocProtectedTag: typeof factory.createJSDocProtectedTag; - /** @deprecated Use `factory.createJSDocReadonlyTag` or the factory supplied by your transformation context instead. */ - const createJSDocReadonlyTag: typeof factory.createJSDocReadonlyTag; - /** @deprecated Use `factory.createJSDocUnknownTag` or the factory supplied by your transformation context instead. */ - const createJSDocTag: typeof factory.createJSDocUnknownTag; - /** @deprecated Use `factory.createJsxElement` or the factory supplied by your transformation context instead. */ - const createJsxElement: typeof factory.createJsxElement; - /** @deprecated Use `factory.updateJsxElement` or the factory supplied by your transformation context instead. */ - const updateJsxElement: typeof factory.updateJsxElement; - /** @deprecated Use `factory.createJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ - const createJsxSelfClosingElement: typeof factory.createJsxSelfClosingElement; - /** @deprecated Use `factory.updateJsxSelfClosingElement` or the factory supplied by your transformation context instead. */ - const updateJsxSelfClosingElement: typeof factory.updateJsxSelfClosingElement; - /** @deprecated Use `factory.createJsxOpeningElement` or the factory supplied by your transformation context instead. */ - const createJsxOpeningElement: typeof factory.createJsxOpeningElement; - /** @deprecated Use `factory.updateJsxOpeningElement` or the factory supplied by your transformation context instead. */ - const updateJsxOpeningElement: typeof factory.updateJsxOpeningElement; - /** @deprecated Use `factory.createJsxClosingElement` or the factory supplied by your transformation context instead. */ - const createJsxClosingElement: typeof factory.createJsxClosingElement; - /** @deprecated Use `factory.updateJsxClosingElement` or the factory supplied by your transformation context instead. */ - const updateJsxClosingElement: typeof factory.updateJsxClosingElement; - /** @deprecated Use `factory.createJsxFragment` or the factory supplied by your transformation context instead. */ - const createJsxFragment: typeof factory.createJsxFragment; - /** @deprecated Use `factory.createJsxText` or the factory supplied by your transformation context instead. */ - const createJsxText: typeof factory.createJsxText; - /** @deprecated Use `factory.updateJsxText` or the factory supplied by your transformation context instead. */ - const updateJsxText: typeof factory.updateJsxText; - /** @deprecated Use `factory.createJsxOpeningFragment` or the factory supplied by your transformation context instead. */ - const createJsxOpeningFragment: typeof factory.createJsxOpeningFragment; - /** @deprecated Use `factory.createJsxJsxClosingFragment` or the factory supplied by your transformation context instead. */ - const createJsxJsxClosingFragment: typeof factory.createJsxJsxClosingFragment; - /** @deprecated Use `factory.updateJsxFragment` or the factory supplied by your transformation context instead. */ - const updateJsxFragment: typeof factory.updateJsxFragment; - /** @deprecated Use `factory.createJsxAttribute` or the factory supplied by your transformation context instead. */ - const createJsxAttribute: typeof factory.createJsxAttribute; - /** @deprecated Use `factory.updateJsxAttribute` or the factory supplied by your transformation context instead. */ - const updateJsxAttribute: typeof factory.updateJsxAttribute; - /** @deprecated Use `factory.createJsxAttributes` or the factory supplied by your transformation context instead. */ - const createJsxAttributes: typeof factory.createJsxAttributes; - /** @deprecated Use `factory.updateJsxAttributes` or the factory supplied by your transformation context instead. */ - const updateJsxAttributes: typeof factory.updateJsxAttributes; - /** @deprecated Use `factory.createJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ - const createJsxSpreadAttribute: typeof factory.createJsxSpreadAttribute; - /** @deprecated Use `factory.updateJsxSpreadAttribute` or the factory supplied by your transformation context instead. */ - const updateJsxSpreadAttribute: typeof factory.updateJsxSpreadAttribute; - /** @deprecated Use `factory.createJsxExpression` or the factory supplied by your transformation context instead. */ - const createJsxExpression: typeof factory.createJsxExpression; - /** @deprecated Use `factory.updateJsxExpression` or the factory supplied by your transformation context instead. */ - const updateJsxExpression: typeof factory.updateJsxExpression; - /** @deprecated Use `factory.createCaseClause` or the factory supplied by your transformation context instead. */ - const createCaseClause: typeof factory.createCaseClause; - /** @deprecated Use `factory.updateCaseClause` or the factory supplied by your transformation context instead. */ - const updateCaseClause: typeof factory.updateCaseClause; - /** @deprecated Use `factory.createDefaultClause` or the factory supplied by your transformation context instead. */ - const createDefaultClause: typeof factory.createDefaultClause; - /** @deprecated Use `factory.updateDefaultClause` or the factory supplied by your transformation context instead. */ - const updateDefaultClause: typeof factory.updateDefaultClause; - /** @deprecated Use `factory.createHeritageClause` or the factory supplied by your transformation context instead. */ - const createHeritageClause: typeof factory.createHeritageClause; - /** @deprecated Use `factory.updateHeritageClause` or the factory supplied by your transformation context instead. */ - const updateHeritageClause: typeof factory.updateHeritageClause; - /** @deprecated Use `factory.createCatchClause` or the factory supplied by your transformation context instead. */ - const createCatchClause: typeof factory.createCatchClause; - /** @deprecated Use `factory.updateCatchClause` or the factory supplied by your transformation context instead. */ - const updateCatchClause: typeof factory.updateCatchClause; - /** @deprecated Use `factory.createPropertyAssignment` or the factory supplied by your transformation context instead. */ - const createPropertyAssignment: typeof factory.createPropertyAssignment; - /** @deprecated Use `factory.updatePropertyAssignment` or the factory supplied by your transformation context instead. */ - const updatePropertyAssignment: typeof factory.updatePropertyAssignment; - /** @deprecated Use `factory.createShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ - const createShorthandPropertyAssignment: typeof factory.createShorthandPropertyAssignment; - /** @deprecated Use `factory.updateShorthandPropertyAssignment` or the factory supplied by your transformation context instead. */ - const updateShorthandPropertyAssignment: typeof factory.updateShorthandPropertyAssignment; - /** @deprecated Use `factory.createSpreadAssignment` or the factory supplied by your transformation context instead. */ - const createSpreadAssignment: typeof factory.createSpreadAssignment; - /** @deprecated Use `factory.updateSpreadAssignment` or the factory supplied by your transformation context instead. */ - const updateSpreadAssignment: typeof factory.updateSpreadAssignment; - /** @deprecated Use `factory.createEnumMember` or the factory supplied by your transformation context instead. */ - const createEnumMember: typeof factory.createEnumMember; - /** @deprecated Use `factory.updateEnumMember` or the factory supplied by your transformation context instead. */ - const updateEnumMember: typeof factory.updateEnumMember; - /** @deprecated Use `factory.updateSourceFile` or the factory supplied by your transformation context instead. */ - const updateSourceFileNode: typeof factory.updateSourceFile; - /** @deprecated Use `factory.createNotEmittedStatement` or the factory supplied by your transformation context instead. */ - const createNotEmittedStatement: typeof factory.createNotEmittedStatement; - /** @deprecated Use `factory.createPartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ - const createPartiallyEmittedExpression: typeof factory.createPartiallyEmittedExpression; - /** @deprecated Use `factory.updatePartiallyEmittedExpression` or the factory supplied by your transformation context instead. */ - const updatePartiallyEmittedExpression: typeof factory.updatePartiallyEmittedExpression; - /** @deprecated Use `factory.createCommaListExpression` or the factory supplied by your transformation context instead. */ - const createCommaList: typeof factory.createCommaListExpression; - /** @deprecated Use `factory.updateCommaListExpression` or the factory supplied by your transformation context instead. */ - const updateCommaList: typeof factory.updateCommaListExpression; - /** @deprecated Use `factory.createBundle` or the factory supplied by your transformation context instead. */ - const createBundle: typeof factory.createBundle; - /** @deprecated Use `factory.updateBundle` or the factory supplied by your transformation context instead. */ - const updateBundle: typeof factory.updateBundle; - /** @deprecated Use `factory.createImmediatelyInvokedFunctionExpression` or the factory supplied by your transformation context instead. */ - const createImmediatelyInvokedFunctionExpression: typeof factory.createImmediatelyInvokedFunctionExpression; - /** @deprecated Use `factory.createImmediatelyInvokedArrowFunction` or the factory supplied by your transformation context instead. */ - const createImmediatelyInvokedArrowFunction: typeof factory.createImmediatelyInvokedArrowFunction; - /** @deprecated Use `factory.createVoidZero` or the factory supplied by your transformation context instead. */ - const createVoidZero: typeof factory.createVoidZero; - /** @deprecated Use `factory.createExportDefault` or the factory supplied by your transformation context instead. */ - const createExportDefault: typeof factory.createExportDefault; - /** @deprecated Use `factory.createExternalModuleExport` or the factory supplied by your transformation context instead. */ - const createExternalModuleExport: typeof factory.createExternalModuleExport; - /** @deprecated Use `factory.createNamespaceExport` or the factory supplied by your transformation context instead. */ - const createNamespaceExport: typeof factory.createNamespaceExport; - /** @deprecated Use `factory.updateNamespaceExport` or the factory supplied by your transformation context instead. */ - const updateNamespaceExport: typeof factory.updateNamespaceExport; - /** @deprecated Use `factory.createToken` or the factory supplied by your transformation context instead. */ - const createToken: (kind: TKind) => Token; - /** @deprecated Use `factory.createIdentifier` or the factory supplied by your transformation context instead. */ - const createIdentifier: (text: string) => Identifier; - /** @deprecated Use `factory.createTempVariable` or the factory supplied by your transformation context instead. */ - const createTempVariable: (recordTempVariable: ((node: Identifier) => void) | undefined) => Identifier; - /** @deprecated Use `factory.getGeneratedNameForNode` or the factory supplied by your transformation context instead. */ - const getGeneratedNameForNode: (node: Node | undefined) => Identifier; - /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic)` or the factory supplied by your transformation context instead. */ - const createOptimisticUniqueName: (text: string) => Identifier; - /** @deprecated Use `factory.createUniqueName(text, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel)` or the factory supplied by your transformation context instead. */ - const createFileLevelUniqueName: (text: string) => Identifier; - /** @deprecated Use `factory.createIndexSignature` or the factory supplied by your transformation context instead. */ - const createIndexSignature: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode) => IndexSignatureDeclaration; - /** @deprecated Use `factory.createTypePredicateNode` or the factory supplied by your transformation context instead. */ - const createTypePredicateNode: (parameterName: Identifier | ThisTypeNode | string, type: TypeNode) => TypePredicateNode; - /** @deprecated Use `factory.updateTypePredicateNode` or the factory supplied by your transformation context instead. */ - const updateTypePredicateNode: (node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode) => TypePredicateNode; - /** @deprecated Use `factory.createStringLiteral`, `factory.createStringLiteralFromNode`, `factory.createNumericLiteral`, `factory.createBigIntLiteral`, `factory.createTrue`, `factory.createFalse`, or the factory supplied by your transformation context instead. */ - const createLiteral: { - (value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral; - (value: number | PseudoBigInt): NumericLiteral; - (value: boolean): BooleanLiteral; - (value: string | number | PseudoBigInt | boolean): PrimaryExpression; - }; - /** @deprecated Use `factory.createMethodSignature` or the factory supplied by your transformation context instead. */ - const createMethodSignature: (typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; - /** @deprecated Use `factory.updateMethodSignature` or the factory supplied by your transformation context instead. */ - const updateMethodSignature: (node: MethodSignature, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined) => MethodSignature; - /** @deprecated Use `factory.createTypeOperatorNode` or the factory supplied by your transformation context instead. */ - const createTypeOperatorNode: { - (type: TypeNode): TypeOperatorNode; - (operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode; - }; - /** @deprecated Use `factory.createTaggedTemplate` or the factory supplied by your transformation context instead. */ - const createTaggedTemplate: { - (tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; - (tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; - }; - /** @deprecated Use `factory.updateTaggedTemplate` or the factory supplied by your transformation context instead. */ - const updateTaggedTemplate: { - (node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression; - (node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression; - }; - /** @deprecated Use `factory.updateBinary` or the factory supplied by your transformation context instead. */ - const updateBinary: (node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken) => BinaryExpression; - /** @deprecated Use `factory.createConditional` or the factory supplied by your transformation context instead. */ - const createConditional: { - (condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression; - (condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression; - }; - /** @deprecated Use `factory.createYield` or the factory supplied by your transformation context instead. */ - const createYield: { - (expression?: Expression | undefined): YieldExpression; - (asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression; - }; - /** @deprecated Use `factory.createClassExpression` or the factory supplied by your transformation context instead. */ - const createClassExpression: (modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; - /** @deprecated Use `factory.updateClassExpression` or the factory supplied by your transformation context instead. */ - const updateClassExpression: (node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]) => ClassExpression; - /** @deprecated Use `factory.createPropertySignature` or the factory supplied by your transformation context instead. */ - const createPropertySignature: (modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer?: Expression | undefined) => PropertySignature; - /** @deprecated Use `factory.updatePropertySignature` or the factory supplied by your transformation context instead. */ - const updatePropertySignature: (node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined) => PropertySignature; - /** @deprecated Use `factory.createExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ - const createExpressionWithTypeArguments: (typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; - /** @deprecated Use `factory.updateExpressionWithTypeArguments` or the factory supplied by your transformation context instead. */ - const updateExpressionWithTypeArguments: (node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression) => ExpressionWithTypeArguments; - /** @deprecated Use `factory.createArrowFunction` or the factory supplied by your transformation context instead. */ - const createArrowFunction: { - (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction; - (modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; - }; - /** @deprecated Use `factory.updateArrowFunction` or the factory supplied by your transformation context instead. */ - const updateArrowFunction: { - (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken, body: ConciseBody): ArrowFunction; - (node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: ConciseBody): ArrowFunction; - }; - /** @deprecated Use `factory.createVariableDeclaration` or the factory supplied by your transformation context instead. */ - const createVariableDeclaration: { - (name: string | BindingName, type?: TypeNode | undefined, initializer?: Expression | undefined): VariableDeclaration; - (name: string | BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - }; - /** @deprecated Use `factory.updateVariableDeclaration` or the factory supplied by your transformation context instead. */ - const updateVariableDeclaration: { - (node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - (node: VariableDeclaration, name: BindingName, exclamationToken: ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration; - }; - /** @deprecated Use `factory.createImportClause` or the factory supplied by your transformation context instead. */ - const createImportClause: (name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: any) => ImportClause; - /** @deprecated Use `factory.updateImportClause` or the factory supplied by your transformation context instead. */ - const updateImportClause: (node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean) => ImportClause; - /** @deprecated Use `factory.createExportDeclaration` or the factory supplied by your transformation context instead. */ - const createExportDeclaration: (decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression | undefined, isTypeOnly?: any) => ExportDeclaration; - /** @deprecated Use `factory.updateExportDeclaration` or the factory supplied by your transformation context instead. */ - const updateExportDeclaration: (node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean) => ExportDeclaration; - /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ - const createJSDocParamTag: (name: EntityName, isBracketed: boolean, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocParameterTag; - /** @deprecated Use `factory.createComma` or the factory supplied by your transformation context instead. */ - const createComma: (left: Expression, right: Expression) => Expression; - /** @deprecated Use `factory.createLessThan` or the factory supplied by your transformation context instead. */ - const createLessThan: (left: Expression, right: Expression) => Expression; - /** @deprecated Use `factory.createAssignment` or the factory supplied by your transformation context instead. */ - const createAssignment: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createStrictEquality` or the factory supplied by your transformation context instead. */ - const createStrictEquality: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createStrictInequality` or the factory supplied by your transformation context instead. */ - const createStrictInequality: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createAdd` or the factory supplied by your transformation context instead. */ - const createAdd: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createSubtract` or the factory supplied by your transformation context instead. */ - const createSubtract: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createLogicalAnd` or the factory supplied by your transformation context instead. */ - const createLogicalAnd: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createLogicalOr` or the factory supplied by your transformation context instead. */ - const createLogicalOr: (left: Expression, right: Expression) => BinaryExpression; - /** @deprecated Use `factory.createPostfixIncrement` or the factory supplied by your transformation context instead. */ - const createPostfixIncrement: (operand: Expression) => PostfixUnaryExpression; - /** @deprecated Use `factory.createLogicalNot` or the factory supplied by your transformation context instead. */ - const createLogicalNot: (operand: Expression) => PrefixUnaryExpression; - /** @deprecated Use an appropriate `factory` method instead. */ - const createNode: (kind: SyntaxKind, pos?: any, end?: any) => Node; - /** - * Creates a shallow, memberwise clone of a node ~for mutation~ with its `pos`, `end`, and `parent` set. - * - * NOTE: It is unsafe to change any properties of a `Node` that relate to its AST children, as those changes won't be - * captured with respect to transformations. - * - * @deprecated Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`. - */ - const getMutableClone: (node: T) => T; - /** @deprecated Use `isTypeAssertionExpression` instead. */ - const isTypeAssertion: (node: Node) => node is TypeAssertion; - /** - * @deprecated Use `isMemberName` instead. - */ - const isIdentifierOrPrivateIdentifier: (node: Node) => node is MemberName; } export = ts; \ No newline at end of file