import { TypeParameterDeclaration } from "https://deno.land/x/ts_morph@16.0.0/mod.ts";
Methods
getConstraint(): TypeNode | undefined
Gets the constraint of the type parameter.
getConstraintOrThrow(): TypeNode<ts.TypeNode>
Gets the constraint of the type parameter or throws if it doesn't exist.
getDefault(): TypeNode | undefined
Gets the default node of the type parameter.
getDefaultOrThrow(): TypeNode<ts.TypeNode>
Gets the default node of the type parameter or throws if it doesn't exist.
getParent(): NodeParentType<ts.TypeParameterDeclaration>
getParentOrThrow(): NonNullable<NodeParentType<ts.TypeParameterDeclaration>>
Gets the structure equivalent to this node.
Gets the variance of the type parameter.
remove(): void
Removes this type parameter.
removeConstraint(): this
Removes the constraint type node.
removeDefault(): this
Removes the default type node.
set(structure: Partial<TypeParameterDeclarationStructure>): this
Sets the node from a structure.
setConstraint(text: string | WriterFunction): this
Sets the type parameter constraint.
setDefault(text: string | WriterFunction): this
Sets the type parameter default type node.
setVariance(variance: TypeParameterVariance): this
Set the variance of the type parameter.