Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface NodeFactory

Hierarchy

  • NodeFactory

Index

Methods

Methods

createAdd

createArrayBindingPattern

createArrayLiteralExpression

  • Parameters

    • Optional elements: readonly Expression[]
    • Optional multiLine: boolean

    Returns ArrayLiteralExpression

createArrayTypeNode

  • Parameters

    Returns ArrayTypeNode

createArrowFunction

createAsExpression

createAssignment

createAwaitExpression

createBigIntLiteral

createBinaryExpression

createBindingElement

createBitwiseAnd

createBitwiseNot

createBitwiseOr

createBitwiseXor

createBlock

  • createBlock(statements: readonly Statement[], multiLine?: boolean): Block
  • Parameters

    • statements: readonly Statement[]
    • Optional multiLine: boolean

    Returns Block

createBreakStatement

  • Parameters

    Returns BreakStatement

createBundle

createCallChain

createCallExpression

createCallSignature

createCaseBlock

createCaseClause

  • Parameters

    Returns CaseClause

createCatchClause

createClassDeclaration

createClassExpression

createComma

createCommaListExpression

createComputedPropertyName

createConditionalExpression

createConditionalTypeNode

createConstructSignature

createConstructorDeclaration

createConstructorTypeNode

createContinueStatement

createDebuggerStatement

  • Returns DebuggerStatement

createDecorator

  • Parameters

    Returns Decorator

createDefaultClause

  • Parameters

    Returns DefaultClause

createDeleteExpression

createDivide

createDoStatement

createElementAccessChain

createElementAccessExpression

createEmptyStatement

  • Returns EmptyStatement

createEnumDeclaration

createEnumMember

createEquality

createExponent

createExportAssignment

createExportDeclaration

createExportDefault

createExportSpecifier

createExpressionStatement

createExpressionWithTypeArguments

createExternalModuleExport

createExternalModuleReference

createFalse

  • Returns FalseLiteral

createForInStatement

createForOfStatement

createForStatement

createFunctionDeclaration

createFunctionExpression

createFunctionTypeNode

createGetAccessorDeclaration

createGreaterThan

createGreaterThanEquals

createHeritageClause

createIdentifier

  • Parameters

    • text: string

    Returns Identifier

createIfStatement

createImmediatelyInvokedArrowFunction

createImmediatelyInvokedFunctionExpression

createImportClause

createImportDeclaration

createImportEqualsDeclaration

createImportSpecifier

createImportTypeNode

  • Parameters

    Returns ImportTypeNode

createIndexSignature

createIndexedAccessTypeNode

createInequality

createInferTypeNode

createInterfaceDeclaration

createIntersectionTypeNode

createJSDocAllType

  • Returns JSDocAllType

createJSDocAugmentsTag

createJSDocAuthorTag

createJSDocCallbackTag

createJSDocClassTag

createJSDocComment

createJSDocDeprecatedTag

createJSDocEnumTag

createJSDocFunctionType

createJSDocImplementsTag

createJSDocLink

  • Parameters

    Returns JSDocLink

createJSDocNameReference

createJSDocNamepathType

createJSDocNonNullableType

createJSDocNullableType

createJSDocOptionalType

createJSDocOverrideTag

createJSDocParameterTag

createJSDocPrivateTag

createJSDocPropertyTag

createJSDocProtectedTag

createJSDocPublicTag

createJSDocReadonlyTag

createJSDocReturnTag

createJSDocSeeTag

createJSDocSignature

createJSDocTemplateTag

createJSDocText

  • Parameters

    • text: string

    Returns JSDocText

createJSDocThisTag

createJSDocTypeExpression

createJSDocTypeLiteral

  • Parameters

    Returns JSDocTypeLiteral

createJSDocTypeTag

createJSDocTypedefTag

createJSDocUnknownTag

createJSDocUnknownType

  • Returns JSDocUnknownType

createJSDocVariadicType

createJsxAttribute

createJsxAttributes

createJsxClosingElement

createJsxElement

createJsxExpression

createJsxFragment

createJsxJsxClosingFragment

createJsxOpeningElement

createJsxOpeningFragment

createJsxSelfClosingElement

createJsxSpreadAttribute

createJsxText

  • createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText
  • Parameters

    • text: string
    • Optional containsOnlyTriviaWhiteSpaces: boolean

    Returns JsxText

createKeywordTypeNode

createLabeledStatement

createLeftShift

createLessThan

createLessThanEquals

createLiteralTypeNode

createLogicalAnd

createLogicalNot

createLogicalOr

createLoopVariable

  • createLoopVariable(reservedInNestedScopes?: boolean): Identifier
  • Create a unique temporary variable for use in a loop.

    Parameters

    • Optional reservedInNestedScopes: boolean

      When true, reserves the temporary variable name in all nested scopes during emit so that the variable can be referenced in a nested function body. This is an alternative to setting EmitFlags.ReuseTempVariableScope on the nested function itself.

    Returns Identifier

createMappedTypeNode

createMetaProperty

createMethodDeclaration

createMethodSignature

createModifier

createModifiersFromModifierFlags

  • Parameters

    Returns Modifier[]

createModuleBlock

  • Parameters

    Returns ModuleBlock

createModuleDeclaration

createModulo

createMultiply

createNamedExports

createNamedImports

createNamedTupleMember

createNamespaceExport

createNamespaceExportDeclaration

createNamespaceImport

createNewExpression

createNoSubstitutionTemplateLiteral

createNodeArray

  • createNodeArray<T>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>
  • Type parameters

    Parameters

    • Optional elements: readonly T[]
    • Optional hasTrailingComma: boolean

    Returns NodeArray<T>

createNonNullChain

  • Parameters

    Returns NonNullChain

createNonNullExpression

createNotEmittedStatement

  • Parameters

    Returns NotEmittedStatement

createNull

  • Returns NullLiteral

createNumericLiteral

  • Parameters

    • value: string | number
    • Optional numericLiteralFlags: TokenFlags

    Returns NumericLiteral

createObjectBindingPattern

createObjectLiteralExpression

createOmittedExpression

  • Returns OmittedExpression

createOptionalTypeNode

createParameterDeclaration

createParenthesizedExpression

createParenthesizedType

createPartiallyEmittedExpression

createPostfixDecrement

createPostfixIncrement

createPostfixUnaryExpression

createPrefixDecrement

createPrefixIncrement

createPrefixMinus

createPrefixPlus

createPrefixUnaryExpression

createPrivateIdentifier

  • Parameters

    • text: string

    Returns PrivateIdentifier

createPropertyAccessChain

createPropertyAccessExpression

createPropertyAssignment

createPropertyDeclaration

createPropertySignature

createQualifiedName

createRegularExpressionLiteral

createRestTypeNode

  • Parameters

    Returns RestTypeNode

createReturnStatement

  • Parameters

    Returns ReturnStatement

createRightShift

createSemicolonClassElement

createSetAccessorDeclaration

createShorthandPropertyAssignment

createSourceFile

createSpreadAssignment

createSpreadElement

  • Parameters

    Returns SpreadElement

createStrictEquality

createStrictInequality

createStringLiteral

  • createStringLiteral(text: string, isSingleQuote?: boolean): StringLiteral
  • Parameters

    • text: string
    • Optional isSingleQuote: boolean

    Returns StringLiteral

createStringLiteralFromNode

createSubtract

createSuper

  • Returns SuperExpression

createSwitchStatement

createTaggedTemplateExpression

createTempVariable

  • createTempVariable(recordTempVariable: (node: Identifier) => void, reservedInNestedScopes?: boolean): Identifier
  • Create a unique temporary variable.

    Parameters

    • recordTempVariable: (node: Identifier) => void

      An optional callback used to record the temporary variable name. This should usually be a reference to hoistVariableDeclaration from a TransformationContext, but can be undefined if you plan to record the temporary variable manually.

    • Optional reservedInNestedScopes: boolean

      When true, reserves the temporary variable name in all nested scopes during emit so that the variable can be referenced in a nested function body. This is an alternative to setting EmitFlags.ReuseTempVariableScope on the nested function itself.

    Returns Identifier

createTemplateExpression

createTemplateHead

  • Parameters

    • text: string
    • Optional rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateHead

  • Parameters

    • text: string
    • rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateHead

createTemplateLiteralType

createTemplateLiteralTypeSpan

createTemplateMiddle

  • Parameters

    • text: string
    • Optional rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateMiddle

  • Parameters

    • text: string
    • rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateMiddle

createTemplateSpan

createTemplateTail

  • Parameters

    • text: string
    • Optional rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateTail

  • Parameters

    • text: string
    • rawText: string
    • Optional templateFlags: TokenFlags

    Returns TemplateTail

createThis

  • Returns ThisExpression

createThisTypeNode

  • Returns ThisTypeNode

createThrowStatement

createToken

createTrue

  • Returns TrueLiteral

createTryStatement

createTupleTypeNode

createTypeAliasDeclaration

createTypeAssertion

createTypeLiteralNode

createTypeOfExpression

createTypeOperatorNode

createTypeParameterDeclaration

createTypePredicateNode

createTypeQueryNode

  • Parameters

    Returns TypeQueryNode

createTypeReferenceNode

createUnionTypeNode

  • Parameters

    Returns UnionTypeNode

createUniqueName

  • Create a unique name based on the supplied text.

    Parameters

    Returns Identifier

createUnsignedRightShift

createVariableDeclaration

createVariableDeclarationList

createVariableStatement

createVoidExpression

createVoidZero

  • Returns VoidExpression

createWhileStatement

createWithStatement

createYieldExpression

getGeneratedNameForNode

restoreOuterExpressions

updateArrayBindingPattern

updateArrayLiteralExpression

updateArrayTypeNode

updateArrowFunction

updateAsExpression

updateAwaitExpression

updateBinaryExpression

updateBindingElement

updateBlock

  • Parameters

    Returns Block

updateBreakStatement

updateBundle

updateCallChain

updateCallExpression

updateCallSignature

updateCaseBlock

updateCaseClause

updateCatchClause

updateClassDeclaration

updateClassExpression

updateCommaListExpression

updateComputedPropertyName

updateConditionalExpression

updateConditionalTypeNode

updateConstructSignature

updateConstructorDeclaration

updateConstructorTypeNode

updateContinueStatement

updateDecorator

updateDefaultClause

updateDeleteExpression

updateDoStatement

updateElementAccessChain

updateElementAccessExpression

updateEnumDeclaration

updateEnumMember

updateExportAssignment

updateExportDeclaration

updateExportSpecifier

updateExpressionStatement

updateExpressionWithTypeArguments

updateExternalModuleReference

updateForInStatement

updateForOfStatement

updateForStatement

updateFunctionDeclaration

updateFunctionExpression

updateFunctionTypeNode

updateGetAccessorDeclaration

updateHeritageClause

updateIfStatement

updateImportClause

updateImportDeclaration

updateImportEqualsDeclaration

updateImportSpecifier

updateImportTypeNode

updateIndexSignature

updateIndexedAccessTypeNode

updateInferTypeNode

updateInterfaceDeclaration

updateIntersectionTypeNode

updateJSDocAugmentsTag

updateJSDocAuthorTag

updateJSDocCallbackTag

updateJSDocClassTag

updateJSDocComment

updateJSDocDeprecatedTag

updateJSDocEnumTag

updateJSDocFunctionType

updateJSDocImplementsTag

updateJSDocLink

updateJSDocNameReference

updateJSDocNamepathType

updateJSDocNonNullableType

updateJSDocNullableType

updateJSDocOptionalType

updateJSDocOverrideTag

updateJSDocParameterTag

updateJSDocPrivateTag

updateJSDocPropertyTag

updateJSDocProtectedTag

updateJSDocPublicTag

updateJSDocReadonlyTag

updateJSDocReturnTag

updateJSDocSeeTag

updateJSDocSignature

updateJSDocTemplateTag

updateJSDocText

  • Parameters

    Returns JSDocText

updateJSDocThisTag

updateJSDocTypeExpression

updateJSDocTypeLiteral

updateJSDocTypeTag

updateJSDocTypedefTag

updateJSDocUnknownTag

updateJSDocVariadicType

updateJsxAttribute

updateJsxAttributes

updateJsxClosingElement

updateJsxElement

updateJsxExpression

updateJsxFragment

updateJsxOpeningElement

updateJsxSelfClosingElement

updateJsxSpreadAttribute

updateJsxText

  • updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText
  • Parameters

    • node: JsxText
    • text: string
    • Optional containsOnlyTriviaWhiteSpaces: boolean

    Returns JsxText

updateLabeledStatement

updateLiteralTypeNode

updateMappedTypeNode

updateMetaProperty

updateMethodDeclaration

updateMethodSignature

updateModuleBlock

updateModuleDeclaration

updateNamedExports

updateNamedImports

updateNamedTupleMember

updateNamespaceExport

updateNamespaceExportDeclaration

updateNamespaceImport

updateNewExpression

updateNonNullChain

updateNonNullExpression

updateObjectBindingPattern

updateObjectLiteralExpression

updateOptionalTypeNode

updateParameterDeclaration

updateParenthesizedExpression

updateParenthesizedType

updatePartiallyEmittedExpression

updatePostfixUnaryExpression

updatePrefixUnaryExpression

updatePropertyAccessChain

updatePropertyAccessExpression

updatePropertyAssignment

updatePropertyDeclaration

updatePropertySignature

updateQualifiedName

updateRestTypeNode

updateReturnStatement

updateSetAccessorDeclaration

updateShorthandPropertyAssignment

updateSourceFile

  • Parameters

    Returns SourceFile

updateSpreadAssignment

updateSpreadElement

updateSwitchStatement

updateTaggedTemplateExpression

updateTemplateExpression

updateTemplateLiteralType

updateTemplateLiteralTypeSpan

updateTemplateSpan

updateThrowStatement

updateTryStatement

updateTupleTypeNode

updateTypeAliasDeclaration

updateTypeAssertion

updateTypeLiteralNode

updateTypeOfExpression

updateTypeOperatorNode

updateTypeParameterDeclaration

updateTypePredicateNode

updateTypeQueryNode

updateTypeReferenceNode

updateUnionTypeNode

updateVariableDeclaration

updateVariableDeclarationList

updateVariableStatement

updateVoidExpression

updateWhileStatement

updateWithStatement

updateYieldExpression

Generated using TypeDoc