class ShorthandPropertyAssignment
extends ShorthandPropertyAssignmentBase<ts.ShorthandPropertyAssignment>
import { ShorthandPropertyAssignment } from "https://dotland.deno.dev/x/ts_morph@15.1.0/mod.ts";
Methods
getObjectAssignmentInitializer(): Expression | undefined
Gets the object assignment initializer if it exists.
getObjectAssignmentInitializerOrThrow(): Expression<ts.Expression>
Gets the object assignment initializer or throws if it doesn't exist.
getParent(): NodeParentType<ts.ShorthandPropertyAssignment>
getParentOrThrow(): NonNullable<NodeParentType<ts.ShorthandPropertyAssignment>>
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.