class ShorthandPropertyAssignment
extends ShorthandPropertyAssignmentBase<ts.ShorthandPropertyAssignment>
import { ShorthandPropertyAssignment } from "https://dotland.deno.dev/x/ts_morph@21.0.1/mod.ts";
Methods
getEqualsTokenOrThrow(message?: string | (() => string)): Node<ts.EqualsToken>
Gets the equals token or throws if it doesn't exist.
getObjectAssignmentInitializer(): Expression | undefined
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>>
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.
hasObjectAssignmentInitializer(): boolean
Gets if the shorthand property assignment has an object assignment initializer.
setInitializer(text: string): PropertyAssignment
Sets the initializer.
Note: The current node will no longer be valid because it's no longer a shorthand property assignment.