ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
25 lines (24 loc) • 845 B
TypeScript
import { Constructor } from "./../../Constructor";
import { Node } from "./../common";
import { ModifierableNode } from "./ModifierableNode";
export declare type ReadonlyableNodeExtensionType = Node & ModifierableNode;
export interface ReadonlyableNode {
/**
* Gets if it's readonly.
*/
isReadonly(): boolean;
/**
* Gets the readonly keyword, or undefined if none exists.
*/
getReadonlyKeyword(): Node | undefined;
/**
* Gets the readonly keyword, or throws if none exists.
*/
getReadonlyKeywordOrThrow(): Node;
/**
* Sets if this node is readonly.
* @param value - If readonly or not.
*/
setIsReadonly(value: boolean): this;
}
export declare function ReadonlyableNode<T extends Constructor<ReadonlyableNodeExtensionType>>(Base: T): Constructor<ReadonlyableNode> & T;