Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno2node/src/deps.deno.ts>ParameterDeclaration

Compile your Deno project to run on Node.js.
Go to Latest
class ParameterDeclaration
extends ParameterDeclarationBase<ts.ParameterDeclaration>
import { ParameterDeclaration } from "https://deno.land/x/deno2node@v1.10.0/src/deps.deno.ts";

Methods

getParent(): NodeParentType<ts.ParameterDeclaration>
getParentOrThrow(message?: string | (() => string)): NonNullable<NodeParentType<ts.ParameterDeclaration>>

Gets the structure equivalent to this node.

isOptional(): boolean

Gets if it's optional.

Gets if this is a property with a scope, readonly, or override keyword (found in class constructors).

isRestParameter(): boolean

Gets if it's a rest parameter.

remove(): void

Remove this parameter.

set(structure: Partial<ParameterDeclarationStructure>): this

Sets the node from a structure.

setHasQuestionToken(value: boolean): this

Sets if this node has a question token.

setInitializer(textOrWriterFunction: string | WriterFunction): this

Sets the initializer.

setIsRestParameter(value: boolean): this

Sets if it's a rest parameter.

setType(textOrWriterFunction: string | WriterFunction): this

Sets the type.