native-shim-monkeypatching.ts:11:17 - error SC2007: values of type '{ (path: string | number | URL, encoding: BufferEncoding): string; (path: string | number | URL, options: { encoding: BufferEncoding; }): string; (path: string | ... 1 more ... | URL): Buffer<...>; (path: string | URL, options: unknown): string | Buffer<...>; }' cannot be compiled: the type declares multiple call signatures (overloads), and a compiled function value is always one concrete signature

  10 | 
  11 | export function bindReadFileSync(): typeof fs.readFileSync {
     |                 ^~~~~~~~~~~~~~~~
  12 |   return fs.readFileSync.bind(fs);

  hint: annotate the slot with the ONE signature the program actually calls (e.g. '(x: number) => string'), or wrap the overloaded function in a single-signature arrow

native-shim-monkeypatching.ts:16:3 - error SC2020: 'Object.defineProperty' is part of the standard library types but has no scriptc lowering yet

  15 | export function defineReadFileSync(): void {
  16 |   Object.defineProperty(fs, "readFileSync", { value: () => "" });
     |   ^~~~~~~~~~~~~~~~~~~~~
  17 | }

  hint: the type checker sees the full standard library, but only the supported surface compiles (https://scriptc.dev/limitations)

native-shim-monkeypatching.ts:19:1 - error SC2004: uses of 'bindReadFileSync' inherit the blocker on its declaration

  18 | 
  19 | bindReadFileSync();
     | ^~~~~~~~~~~~~~~~
  20 | defineReadFileSync();

  hint: the declaration of 'bindReadFileSync' did not compile — fix the diagnostic reported there and these sites clear with it