templates-mo
Version:
Templates is a scaffolding framework that makes code generation simple, dynamic, and reusable. Generate files, parts of your app, or whole project structures—without the repetitive copy-pasting
31 lines (30 loc) • 1.09 kB
TypeScript
import { Tree, TreeCallBack } from '../data-structures/tree';
export interface SimpleFileSystemInfo {
name: string;
type: string;
path: string;
children?: SimpleFileSystemInfo[];
}
export interface FileSystemNodeCallback<TReturn = void> extends TreeCallBack<FileSystemNode, TReturn> {
}
export declare abstract class FileSystemNode extends Tree<null, FileSystemNode> {
name: string;
type: string;
static ignoreFiles: string[];
depth: number;
verbose: boolean;
parent: FileSystemNode | null;
parentPath: string;
path: string;
pathFromRoot: string;
children: FileSystemNode[];
constructor(name: string, type: string, parentDirectory: FileSystemNode | string, verbose: boolean);
private isFileSystemNode;
toObject(): SimpleFileSystemInfo;
is(type: string): boolean;
get(name: string): FileSystemNode;
addChild<TValue extends FileSystemNode>(value: TValue): TValue;
getRelativePathFrom(parentDirNode: any, includeParentNode?: boolean): string;
logTree(names?: any[]): void;
}
export default FileSystemNode;