cr-react-cli
Version:
Create react files with a single command
25 lines (24 loc) • 719 B
TypeScript
export declare type fileType = 'js' | 'ts' | 'css' | 'scss';
interface Actions {
[id: number]: Action;
}
interface Action {
type: string;
tag?: string;
method: Function;
args: Array<any>;
}
export declare const createAction: <T>() => (type: T) => (target: any, propertyName: string, descriptor: PropertyDescriptor) => void;
declare class TemplateBuilder {
private fileType;
private template;
private nextId;
protected actions: Actions;
constructor(fileType: fileType);
private indent;
protected _insert(content: string): this;
insert(content: string): this;
protected insertAction(options: Action): this;
toString(): string;
}
export default TemplateBuilder;