Skip to main content
Module

x/ts_morph/mod.ts>TextRange

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class TextRange
import { TextRange } from "https://deno.land/x/ts_morph@15.1.0/mod.ts";

Constructors

new
protected
TextRange()

Type Parameters

optional
TRange extends ts.TextRange = ts.TextRange

Properties

readonly
compilerObject: TRange

Gets the underlying compiler object.

Methods

getEnd(): number

Gets the end.

getPos(): number

Gets the position.

Gets the source file of the text range.

getText(): string

Gets the text of the text range.

getWidth(): number

Gets the width of the text range.

wasForgotten(): boolean

Gets if the text range was forgotten.

This will be true after any manipulations have occured to the source file this text range was generated from.