Skip to main content
Module

x/ts_morph/ts_morph.d.ts>TypeParameter

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

Methods

getConstraint(): Type | undefined

Gets the constraint type.

getConstraintOrThrow(message?: string | (() => string)): Type

Gets the constraint or throws if it doesn't exist.

getDefault(): Type | undefined

Gets the default type or undefined if it doesn't exist.

getDefaultOrThrow(message?: string | (() => string)): Type

Gets the default type or throws if it doesn't exist.