import type { FsCondition } from '../../../errors/index.ts'; import type { ErrnoCodes, FSHost } from './types.ts'; /** * The conditions this filesystem can report, named rather than * numbered. Now the shared vocabulary (errors/types.ts) instead of a * private five-name union, so the layer that decides a call failed * names the same condition every other boundary does; the adapter * below still turns the name into whatever number the running * interpreter uses. */ export type FsErrorCode = FsCondition; /** * Build an error naming a POSIX condition, for failures the host sees. * * Args: * code: name of the condition. * message: what failed, for a human reading the stack. */ export declare function fsError(code: FsErrorCode, message: string): Error; /** * Build the error a guest syscall should fail with. * * Both halves come from the running interpreter: the constructor so the * kernel recognizes it as an errno rather than a crash, and the number * so it is musl's and not a literal that happens to be right on Linux. * A name this build's table does not define answers EIO rather than * ErrnoError(undefined). * * Args: * host: the Emscripten FS namespace supplying `ErrnoError`. * codes: that interpreter's errno table (`pyodide.ERRNO_CODES`). * code: name of the condition to report. */ export declare function errnoError(host: FSHost, codes: ErrnoCodes, code: FsErrorCode): Error; //# sourceMappingURL=errors.d.ts.map