import { ConditionalTypeNode } from "https://dotland.deno.dev/x/ts_morph@17.0.1/mod.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(message?: string | (() => string)): 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
.