import type { FilehandleOptions, GenericFilehandle, ReadFileOptions, ReadFileTextOptions } from './filehandle.ts'; import type { LocalFileOptions } from './localFile.ts'; export * from './filehandle.ts'; export type { LocalFileOptions } from './localFile.ts'; export { default as BlobFile } from './blobFile.ts'; export { default as RemoteFile } from './remoteFile.ts'; /** * Stub standing in for the Node.js LocalFile in browser builds. Every member * carries the same signature as the real one — otherwise code written against * the node class fails to compile in any bundle that resolves the `browser` * export condition, which is the one thing this stub exists to prevent. * `implements GenericFilehandle` keeps drift from the interface a compile * error rather than a runtime one. * * The parameters go unread: every call rejects. They are here to be typed, so * a bundle only discovers that a local file is unavailable in the browser at * the point it actually tries to read one. */ export declare class LocalFile implements GenericFilehandle { /** the path this stub was handed — see {@link GenericFilehandle.source} */ readonly source: string; constructor(source: string, _opts?: LocalFileOptions); private unimplemented; readFile(options?: ReadFileOptions): Promise>; readFile(options: ReadFileTextOptions): Promise; read(_length: number, _position?: number, _opts?: FilehandleOptions): Promise; stat(): Promise; close(): Promise; }