Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ts_morph/ts_morph.d.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@16.0.0/ts_morph.d.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.