Properties

Link copied to clipboard
abstract external var _declarationBrand: Any?
Link copied to clipboard
abstract external var _localsContainerBrand: Any?
Link copied to clipboard
Link copied to clipboard
abstract external val end: Int
Link copied to clipboard
Link copied to clipboard
abstract external var fileName: String
Link copied to clipboard
abstract external val flags: NodeFlags
Link copied to clipboard
abstract external var hasNoDefaultLib: Boolean
Link copied to clipboard
abstract external var impliedNodeFormat: ResolutionMode

When module is Node16 or NodeNext, this field controls whether the source file in question is an ESNext-output-format file, or a CommonJS-output-format module. This is derived by the module resolver as it looks up the file, since it is derived from either the file extension of the module, or the containing package.json context, and affects both checking and emit.

Link copied to clipboard
abstract external var isDeclarationFile: Boolean
Link copied to clipboard
abstract external override val kind: SyntaxKind.SourceFile
Link copied to clipboard
abstract external var languageVariant: LanguageVariant
Link copied to clipboard
abstract external var languageVersion: ScriptTarget
Link copied to clipboard
Link copied to clipboard
abstract external var moduleName: String?
Link copied to clipboard
abstract external val parent: Node?
Link copied to clipboard
abstract external val pos: Int
Link copied to clipboard
Link copied to clipboard
abstract external val statements: NodeArray<Statement>
Link copied to clipboard
abstract external var text: String
Link copied to clipboard

Functions

Link copied to clipboard
abstract external fun <T> forEachChild(cbNode: (node: Node) -> T?, cbNodeArray: (NodeArray<Node>) -> T? = definedExternally): T?
Link copied to clipboard
abstract external fun getChildAt(index: Int, sourceFile: SourceFile = definedExternally): Node
Link copied to clipboard
abstract external fun getChildCount(sourceFile: SourceFile = definedExternally): Int
Link copied to clipboard
abstract external fun getChildren(sourceFile: SourceFile = definedExternally): ReadonlyArray<Node>
Link copied to clipboard
abstract external fun getEnd(): Int
Link copied to clipboard
abstract external fun getFirstToken(sourceFile: SourceFile = definedExternally): Node?
Link copied to clipboard
abstract external fun getFullStart(): Int
Link copied to clipboard
abstract external fun getFullText(sourceFile: SourceFile = definedExternally): String
Link copied to clipboard
abstract external fun getFullWidth(): Int
Link copied to clipboard
abstract external fun getLastToken(sourceFile: SourceFile = definedExternally): Node?
Link copied to clipboard
abstract external fun getLeadingTriviaWidth(sourceFile: SourceFile = definedExternally): Int
Link copied to clipboard
Link copied to clipboard
abstract external fun getLineEndOfPosition(pos: Int): Int
Link copied to clipboard
abstract external fun getLineStarts(): ReadonlyArray<Int>
Link copied to clipboard
abstract external fun getPositionOfLineAndCharacter(line: Int, character: Int): Int
Link copied to clipboard
abstract external fun getSourceFile(): SourceFile?
Link copied to clipboard
abstract external fun getStart(sourceFile: SourceFile = definedExternally, includeJsDocComment: Boolean = definedExternally): Int
Link copied to clipboard
abstract external fun getText(sourceFile: SourceFile = definedExternally): String
Link copied to clipboard
abstract external fun getWidth(sourceFile: SourceFileLike = definedExternally): Int
Link copied to clipboard
abstract external fun update(newText: String, textChangeRange: TextChangeRange): SourceFile