import type { Stats as NodeStats } from 'node:fs'; import type { Compiled } from '../runtime/allocator.ts'; import { type TqdmOnProgress } from '../helpers/tqdm.ts'; export type Stats = Pick; export type Dlopen = (filename: string | URL, symbols: S) => Deno.DynamicLibrary | Promise>; export type FFICallback = (x: { parameters: Deno.NativeType[]; result: Deno.NativeResultType; }, cb: (...a: any[]) => any) => any; export declare class WebEnv { NAME: string; PLATFORM: string; CPU_DEVICE: string; DB_VERSION: number; DEVICES: Record; get OSX(): boolean; get WINDOWS(): boolean; get CACHE_DIR(): string; get CACHE_DB(): string; notImplemented: () => never; readTextFile: (path: string) => Promise; writeTextFile: (path: string, data: string) => Promise; private _cache; readFile: (path: string) => Promise; writeFile: (path: string, data: Uint8Array) => Promise; remove: (path: string) => Promise; realPath: (...paths: string[]) => string; stat: (path: string) => Promise; statSync: (path: string) => Stats; tempFile: (ext?: string) => Promise; mkdir: (path: string) => Promise; fetchSave: (url: string, path?: string, onProgress?: TqdmOnProgress) => Promise; writeStdout: (p: string) => void; homedir: () => string; gunzip: (buffer: ArrayBuffer) => Promise; args: () => string[]; machine: () => string; exit: (code: number) => never; exec: (cmd: string) => Promise; prompt: (msg: string, def?: string) => Promise; sha256: (data: Uint8Array) => Uint8Array; dlopen: Dlopen; ptr: (buffer: ArrayBuffer, offset?: number) => any; ptrToU64: (ptr: any) => bigint; u64ToPtr: (u64: bigint) => any; getCString: (ptr: any) => string; getArrayBuffer: (ptr: any, byteLength: number, offset?: number) => ArrayBuffer; callback: FFICallback; private _db; private _open_db; disk_get: (table: string, key: string) => Promise; disk_put: (table: string, key: string, value: string | Uint8Array) => Promise; }