import { Exception, type ExceptionExtra, type ExceptionJSON } from 'kerium';
import type { FileSystem } from './filesystem.js';
/**
 * @deprecated Use {@link ExceptionJSON} instead
 * @category Internals
 */
export type ErrnoErrorJSON = ExceptionJSON;
/**
 * @deprecated Use {@link Exception} instead
 * @category Internals
 */
export declare const ErrnoError: typeof Exception;
/**
 * @deprecated Use {@link Exception} instead
 * @category Internals
 */
export type ErrnoError = Exception;
export declare function withPath<E extends Exception>(e: E, path: string): E;
/**
 * @internal @hidden
 */
export declare function wrap<const FS, const Prop extends keyof FS & string>(fs: FS, prop: Prop, path: string | ExceptionExtra, dest?: string): FS[Prop];
/**
 * @internal
 * Wraps an `fs` so that thrown errors aren't empty
 */
export declare function withExceptionContext<const FS extends FileSystem>(fs: FS, context: ExceptionExtra): FS;
