Module

x/ts_morph/mod.ts>StringLiteral

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
class StringLiteral
extends StringLiteralBase<ts.StringLiteral>
import { StringLiteral } from "https://dotland.deno.dev/x/ts_morph@17.0.0/mod.ts";

Methods

getLiteralValue(): string

Gets the literal value.

This is equivalent to .getLiteralText() for string literals and only exists for consistency with other literals.

getParent(): NodeParentType<ts.StringLiteral>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.StringLiteral>>

Gets the quote kind.

setLiteralValue(value: string): this

Sets the literal value.