Skip to main content
Module

x/ts_morph/ts_morph.d.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://deno.land/x/ts_morph@15.1.0/ts_morph.d.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://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<TypeParameteredNodeExtensionType>