Skip to main content
Module

x/ts_morph/ts_morph.d.ts>ConditionalTypeNode

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

Methods

getCheckType(): TypeNode<ts.TypeNode>

Gets the conditional type node's check type.

Ex. In CheckType extends ExtendsType ? TrueType : FalseType returns CheckType.

getExtendsType(): TypeNode<ts.TypeNode>

Gets the conditional type node's extends type.

Ex. In CheckType extends ExtendsType ? TrueType : FalseType returns ExtendsType.

getFalseType(): TypeNode<ts.TypeNode>

Gets the conditional type node's false type.

Ex. In CheckType extends ExtendsType ? TrueType : FalseType returns FalseType.

getParent(): NodeParentType<ts.ConditionalTypeNode>
getParentOrThrow(): NonNullable<NodeParentType<ts.ConditionalTypeNode>>
getTrueType(): TypeNode<ts.TypeNode>

Gets the conditional type node's true type.

Ex. In CheckType extends ExtendsType ? TrueType : FalseType returns TrueType.