Skip to main content
Module

x/ts_morph/mod.ts>StringLiteral

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Latest
class StringLiteral
extends StringLiteralBase<ts.StringLiteral>
import { StringLiteral } from "https://deno.land/x/ts_morph@22.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.