Skip to main content
Module

x/ts_morph/ts_morph.d.ts>ParameteredNode

TypeScript Compiler API wrapper for static analysis and programmatic code changes.
Very Popular
Go to Latest
interface ParameteredNode
import { type ParameteredNode } from "https://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Methods

getParameter(name: string): ParameterDeclaration | undefined

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

getParameter(findFunction: (declaration: ParameterDeclaration) => boolean): ParameterDeclaration | undefined

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

getParameterOrThrow(name: string): ParameterDeclaration

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

getParameterOrThrow(findFunction: (declaration: ParameterDeclaration) => boolean): ParameterDeclaration

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

getParameters(): ParameterDeclaration[]

Gets all the parameters of the node.

Adds a parameter.

addParameters(structures: ReadonlyArray<OptionalKind<ParameterDeclarationStructure>>): ParameterDeclaration[]

Adds parameters.

insertParameters(index: number, structures: ReadonlyArray<OptionalKind<ParameterDeclarationStructure>>): ParameterDeclaration[]

Inserts parameters.

insertParameter(index: number, structure: OptionalKind<ParameterDeclarationStructure>): ParameterDeclaration

Inserts a parameter.

function ParameteredNode
import { ParameteredNode } from "https://deno.land/x/ts_morph@15.1.0/ts_morph.d.ts";

Type Parameters

T extends Constructor<ParameteredNodeExtensionType>