/** * @file Early-snapshot accessor for `node:fs`. The `require('fs')` runs at * module load, but ONLY inside the `IS_NODE` runtime guard — in a browser * `IS_NODE` is `false`, so the require branch never executes (bundlers mark * `node:` builtins external, so the call survives in the output but is * unreachable at runtime). In Node the module is captured at load: a * primordial-style snapshot, so a later tamper of the `node:fs` cache entry * can't redirect what we already hold. `getNodeFs()` returns the captured * reference; the `/*@__PURE__*\/` lets a Node-targeted minifier strip the * capture when `getNodeFs` is unused. Was a lazy first-call loader; the * eager-but-guarded form keeps the browser-safe behavior while gaining the * load-time snapshot. Two surfaces: `getNodeFs()` returns the module object * with LATE method lookup (spy-able — the test injection point); the * `Fs` consts (`FsExistsSync`, `FsReadFileSync`, …) are method * references FROZEN at load, tamper-proof against a method swap but not * spy-able, for Socket's hot fs calls. Both stay browser-safe behind IS_NODE * \+ `/*@__PURE__*\/`. */ import type * as NodeFs from 'node:fs'; export declare function getNodeFs(): typeof NodeFs; export declare const FsAccessSync: any; export declare const FsExistsSync: any; export declare const FsMkdirSync: any; export declare const FsReadFileSync: any; export declare const FsRealpathSync: any; export declare const FsStatSync: any; export declare const FsWriteFileSync: any;