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

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

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

Methods

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

Gets the structure equivalent to this node.

Gets the corresponding variable statement if it exists. Returns undefined for variable declarations in for statements.

getVariableStatementOrThrow(message?: string | (() => string)): VariableStatement

Gets the corresponding variable statement if it exists. Throws for variable declarations in for statements.

remove(): void

Removes this variable declaration.

set(structure: Partial<VariableDeclarationStructure>): this

Sets the node from a structure.