UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

19 lines (18 loc) 674 B
import * as ts from "typescript"; import { Node, Expression } from "./../common"; import { ChildOrderableNode } from "./../base"; export declare const ReturnStatementBase: (new (...args: any[]) => ChildOrderableNode) & typeof Node; export declare class ReturnStatement extends ReturnStatementBase<ts.ReturnStatement> { /** * Gets this return statement's expression if it exists or throws. */ getExpressionOrThrow(): Expression<ts.Expression>; /** * Gets this return statement's expression if it exists. */ getExpression(): Expression<ts.Expression> | undefined; /** * Removes this return statement. */ remove(): void; }