UNPKG

dofs

Version:

A filesystem for Cloudflare Durable Objects.

14 lines (12 loc) 1.17 kB
import { CreateOptions, DeviceStats, Fs, FsOptions, ListDirOptions, MkdirOptions, ReadFileOptions, ReadOptions, RmdirOptions, SetAttrOptions, Stat, WriteFileOptions, WriteOptions } from "./Fs-CX3m-F9L.js"; import { DurableObject } from "cloudflare:workers"; //#region src/withDofs.d.ts type WithDofs<TEnv extends Cloudflare.Env> = DurableObject<TEnv> & { getFs: () => Fs; }; declare const withDofs: <TEnv extends Cloudflare.Env>(cls: new (ctx: DurableObjectState, env: TEnv) => DurableObject<TEnv>, options?: FsOptions) => new (ctx: DurableObjectState, env: TEnv) => WithDofs<TEnv>; declare function Dofs<TEnv extends Cloudflare.Env>(options?: FsOptions): <T extends new (ctx: DurableObjectState, env: TEnv) => DurableObject<TEnv>>(target: new (ctx: DurableObjectState, env: TEnv) => DurableObject<TEnv>) => new (ctx: DurableObjectState, env: TEnv) => WithDofs<TEnv>; //# sourceMappingURL=withDofs.d.ts.map //#endregion export { CreateOptions, DeviceStats, Dofs, Fs, FsOptions, ListDirOptions, MkdirOptions, ReadFileOptions, ReadOptions, RmdirOptions, SetAttrOptions, Stat, WithDofs, WriteFileOptions, WriteOptions, withDofs }; //# sourceMappingURL=index.d.ts.map