UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

19 lines (18 loc) 967 B
import * as ts from "typescript"; import { PropertyNamedNode, QuestionTokenableNode, InitializerGetExpressionableNode } from "./../../base"; import { Node } from "./../Node"; import { ShorthandPropertyAssignment } from "./ShorthandPropertyAssignment"; export declare const PropertyAssignmentBase: (new (...args: any[]) => InitializerGetExpressionableNode) & (new (...args: any[]) => QuestionTokenableNode) & (new (...args: any[]) => PropertyNamedNode) & typeof Node; export declare class PropertyAssignment extends PropertyAssignmentBase<ts.PropertyAssignment> { /** * Removes the initailizer and returns the new shorthand property assignment. * * Note: The current node will no longer be valid because it's no longer a property assignment. */ removeInitializer(): ShorthandPropertyAssignment; /** * Sets the initializer. * @param text - New text to set for the initializer. */ setInitializer(text: string): this; }