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

x/ts_morph/ts_morph.d.ts>RegularExpressionLiteral

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class RegularExpressionLiteral
extends RegularExpressionLiteralBase<ts.RegularExpressionLiteral>
import { RegularExpressionLiteral } from "https://deno.land/x/ts_morph@16.0.0/ts_morph.d.ts";

Methods

getLiteralValue(): RegExp

Gets the literal value.

getParent(): NodeParentType<ts.RegularExpressionLiteral>
getParentOrThrow(): NonNullable<NodeParentType<ts.RegularExpressionLiteral>>
setLiteralValue(pattern: string, flags?: string): this

Sets the literal value according to a pattern and some flags.

setLiteralValue(regExp: RegExp): this

Sets the literal value according to a regular expression object.