UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

21 lines (20 loc) 553 B
import * as ts from "typescript"; import { Type } from "./Type"; export declare class TypeParameter extends Type<ts.TypeParameter> { /** * Gets the constraint or throws if it doesn't exist. */ getConstraintOrThrow(): Type; /** * Gets the constraint type. */ getConstraint(): Type | undefined; /** * Gets the default type or throws if it doesn't exist. */ getDefaultOrThrow(): Type; /** * Gets the default type or undefined if it doesn't exist. */ getDefault(): Type | undefined; }