Module

x/ts_morph/mod.ts>TypeParameteredNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
interface TypeParameteredNode
import { type TypeParameteredNode } from "https://dotland.deno.dev/x/ts_morph@21.0.0/mod.ts";

Methods

getTypeParameter(name: string): TypeParameterDeclaration | undefined

Gets a type parameter or undefined if it doesn't exist.

getTypeParameter(findFunction: (declaration: TypeParameterDeclaration) => boolean): TypeParameterDeclaration | undefined

Gets a type parameter or undefined if it doesn't exist.

getTypeParameterOrThrow(name: string): TypeParameterDeclaration

Gets a type parameter or throws if it doesn't exist.

getTypeParameterOrThrow(findFunction: (declaration: TypeParameterDeclaration) => boolean): TypeParameterDeclaration

Gets a type parameter or throws if it doesn't exist.

getTypeParameters(): TypeParameterDeclaration[]

Gets the type parameters.

Adds a type parameter.

addTypeParameters(structures: ReadonlyArray<OptionalKind<TypeParameterDeclarationStructure> | string>): TypeParameterDeclaration[]

Adds type parameters.

insertTypeParameter(index: number, structure: OptionalKind<TypeParameterDeclarationStructure> | string): TypeParameterDeclaration

Inserts a type parameter.

insertTypeParameters(index: number, structures: ReadonlyArray<OptionalKind<TypeParameterDeclarationStructure> | string>): TypeParameterDeclaration[]

Inserts type parameters.

function TypeParameteredNode
import { TypeParameteredNode } from "https://dotland.deno.dev/x/ts_morph@21.0.0/mod.ts";

Type Parameters

T extends Constructor<TypeParameteredNodeExtensionType>