/** * Utility helpers for pi-test-harness consumers. */ /** * Remove a file, silently ignoring EPERM/EBUSY errors. * * **Why this exists**: On Windows, pi extensions that open SQLite databases * do so in the `session_start` event handler. The corresponding close happens * in `session_shutdown` — but that event fires at Node.js **process exit**, * NOT when `session.dispose()` is called. This means DB files remain locked * for the lifetime of the test runner process. * * Safe pattern in afterEach: * ```ts * afterEach(() => { * safeRmSync(dbPath); * safeRmSync(dbPath + "-wal"); * safeRmSync(dbPath + "-shm"); * }); * ``` * * Files are cleaned up by the OS when the process exits (or on next run). * Using unique DB paths per test ensures isolation. */ /** * Returns true for errno codes that represent a Windows file-lock condition. * Exported for unit testing — not part of the public API contract. * @internal */ export declare function _isLockedFileError(err: unknown): boolean; export declare function safeRmSync(filePath: string): void; //# sourceMappingURL=utils.d.ts.map