Skip to main content
Module

x/ts_morph/mod.ts>Type#getLiteralValue

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
method Type.prototype.getLiteralValue
import { Type } from "https://deno.land/x/ts_morph@15.1.0/mod.ts";

Gets the value of a literal or returns undefined if this is not a literal type.

Returns

| string
| number
| ts.PseudoBigInt
| undefined