Skip to main content
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://deno.land/x/ts_morph@15.1.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(): NonNullable<NodeParentType<ts.StringLiteral>>

Gets the quote kind.

setLiteralValue(value: string): this

Sets the literal value.