MCPcopy Create free account
hub / github.com/remix-run/react-router / isFsError

Function isFsError

scripts/utils/fs.ts:23–30  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

21}
22
23function isFsError(error: unknown): error is { code: string } {
24 return (
25 typeof error === "object" &&
26 error != null &&
27 "code" in error &&
28 typeof error.code === "string"
29 );
30}
31
32export function writeFile(filename: string, data: string): void {
33 fs.writeFileSync(filename, data);

Callers 1

readFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected