drupflare/worker - v1.0.0
    Preparing search index...

    Type Alias MirrorBucket

    The slice of R2 this module needs, narrowed so the drain is drivable over a stand-in.

    Structural rather than R2Bucket, for the same reason FileSql is structural: the interesting cases are a put that throws, a bucket binding that is absent, and a refusal that must happen BEFORE either -- none of which need a real bucket to exercise, and all of which a real bucket would make slow and non-deterministic to reach.

    type MirrorBucket = {
        delete(key: string): Promise<unknown>;
        put(key: string, value: Uint8Array, options?: unknown): Promise<unknown>;
    }
    Index
    • Parameters

      • key: string

      Returns Promise<unknown>

    • Parameters

      • key: string
      • value: Uint8Array
      • Optionaloptions: unknown

      Returns Promise<unknown>