Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
method TypeParameterDeclaration.prototype.getConstraintOrThrow
import { TypeParameterDeclaration } from "https://deno.land/x/deno2node@v1.12.0/src/deps.deno.ts";

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

Parameters

optional
message: string | (() => string)

Returns

TypeNode<ts.TypeNode>