mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-22 23:21:17 +00:00
13 lines
472 B
TypeScript
13 lines
472 B
TypeScript
interface GeneratedTextAssetFs {
|
|
readFile(path: string, encoding: "utf8"): Promise<string>;
|
|
mkdir(path: string, options: { recursive: true }): Promise<unknown>;
|
|
writeFile(path: string, contents: string, encoding: "utf8"): Promise<unknown>;
|
|
}
|
|
|
|
/** Writes a generated text asset and returns whether its contents changed. */
|
|
export function writeGeneratedTextAsset(
|
|
filePath: string,
|
|
contents: string,
|
|
params?: { fs?: GeneratedTextAssetFs },
|
|
): Promise<boolean>;
|