@eclipsejs/cli
Version:
Inject environment variables on runtime
21 lines (20 loc) • 778 B
TypeScript
interface KeyValues {
[key: string]: string | number | boolean | Record<string, any>;
}
export declare class FileUtil {
private FILE_PATH;
constructor(filePath: string);
find(typeSuffix?: string): Promise<boolean>;
writeFile(data: string, typeSuffix?: string): Promise<boolean>;
createOrUpdate({ data, fileComment, typeSuffix, }: {
data: KeyValues;
fileComment?: string;
typeSuffix?: string;
}): Promise<boolean>;
read(): Promise<string>;
readIntoObject<T>(containsComment?: boolean): Promise<T | null>;
replaceOnFile(update: KeyValues): Promise<boolean>;
}
export declare const fileNotationToObject: <T>(fileData: string) => T;
export declare const objectToFileNotation: (keyValues: object) => string;
export {};