Skip to main content
Module

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

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

Methods

getEqualsToken(): Node<ts.EqualsToken> | undefined

Gets the equals token if it exists.

getEqualsTokenOrThrow(message?: string | (() => string)): Node<ts.EqualsToken>

Gets the equals token or throws if it doesn't exist.

Gets the object assignment initializer if it exists.

getObjectAssignmentInitializerOrThrow(message?: string | (() => string)): Expression<ts.Expression>

Gets the object assignment initializer or throws if it doesn't exist.

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

Gets the structure equivalent to this node.

getValueSymbol(): Symbol | undefined

Gets the shorthand assignment value symbol of this node if it exists. Convenience API for TypeChecker#getShorthandAssignmentValueSymbol(node)

getValueSymbolOrThrow(message?: string | (() => string)): Symbol

Gets the value symbol or throws if it doesn't exist.

Gets if the shorthand property assignment has an object assignment initializer.

Remove the object assignment initializer.

This is only useful to remove bad code.

set(structure: Partial<ShorthandPropertyAssignmentStructure>): this

Sets the node from a structure.

Sets the initializer.

Note: The current node will no longer be valid because it's no longer a shorthand property assignment.