Skip to main content
Module

x/ts_morph/mod.ts>TrueLiteral

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

Methods

getLiteralValue(): boolean

Gets the literal value.

getParent(): NodeParentType<ts.TrueLiteral>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.TrueLiteral>>
setLiteralValue(value: boolean): this | FalseLiteral

Sets the literal value.

Note: This forgets the current node and returns the new node if the value changes.