Refactor: new write strategy (#58)

This commit is contained in:
Sukka
2025-01-29 03:58:49 +08:00
committed by GitHub
parent 6606d5cb01
commit b22079f5eb
17 changed files with 1096 additions and 673 deletions

View File

@@ -60,6 +60,17 @@ export function withBannerArray(title: string, description: string[] | readonly
];
};
export function notSupported(name: string) {
return (...args: unknown[]) => {
console.error(`${name}: not supported.`, args);
throw new Error(`${name}: not implemented.`);
};
}
export function withIdentityContent(title: string, description: string[] | readonly string[], date: Date, content: string[]) {
return content;
};
export function isDirectoryEmptySync(path: PathLike) {
const directoryHandle = fs.opendirSync(path);