SongGuess
    Preparing search index...

    Interface KVNamespace<Key>

    interface KVNamespace<Key extends string = string> {
        delete(key: Key): Promise<void>;
        get(
            key: Key,
            options?: Partial<KVNamespaceGetOptions<undefined>>,
        ): Promise<string | null>;
        get(key: Key, type: "text"): Promise<string | null>;
        get<ExpectedValue = unknown>(
            key: Key,
            type: "json",
        ): Promise<ExpectedValue | null>;
        get(key: Key, type: "arrayBuffer"): Promise<ArrayBuffer | null>;
        get(key: Key, type: "stream"): Promise<ReadableStream<any> | null>;
        get(
            key: Key,
            options?: KVNamespaceGetOptions<"text">,
        ): Promise<string | null>;
        get<ExpectedValue = unknown>(
            key: Key,
            options?: KVNamespaceGetOptions<"json">,
        ): Promise<ExpectedValue | null>;
        get(
            key: Key,
            options?: KVNamespaceGetOptions<"arrayBuffer">,
        ): Promise<ArrayBuffer | null>;
        get(
            key: Key,
            options?: KVNamespaceGetOptions<"stream">,
        ): Promise<ReadableStream<any> | null>;
        get(key: Key[], type: "text"): Promise<Map<string, string | null>>;
        get<ExpectedValue = unknown>(
            key: Key[],
            type: "json",
        ): Promise<Map<string, ExpectedValue | null>>;
        get(
            key: Key[],
            options?: Partial<KVNamespaceGetOptions<undefined>>,
        ): Promise<Map<string, string | null>>;
        get(
            key: Key[],
            options?: KVNamespaceGetOptions<"text">,
        ): Promise<Map<string, string | null>>;
        get<ExpectedValue = unknown>(
            key: Key[],
            options?: KVNamespaceGetOptions<"json">,
        ): Promise<Map<string, ExpectedValue | null>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            options?: Partial<KVNamespaceGetOptions<undefined>>,
        ): Promise<KVNamespaceGetWithMetadataResult<string, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            type: "text",
        ): Promise<KVNamespaceGetWithMetadataResult<string, Metadata>>;
        getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
            key: Key,
            type: "json",
        ): Promise<KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            type: "arrayBuffer",
        ): Promise<KVNamespaceGetWithMetadataResult<ArrayBuffer, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            type: "stream",
        ): Promise<KVNamespaceGetWithMetadataResult<ReadableStream<any>, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            options: KVNamespaceGetOptions<"text">,
        ): Promise<KVNamespaceGetWithMetadataResult<string, Metadata>>;
        getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
            key: Key,
            options: KVNamespaceGetOptions<"json">,
        ): Promise<KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            options: KVNamespaceGetOptions<"arrayBuffer">,
        ): Promise<KVNamespaceGetWithMetadataResult<ArrayBuffer, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key,
            options: KVNamespaceGetOptions<"stream">,
        ): Promise<KVNamespaceGetWithMetadataResult<ReadableStream<any>, Metadata>>;
        getWithMetadata<Metadata = unknown>(
            key: Key[],
            type: "text",
        ): Promise<Map<string, KVNamespaceGetWithMetadataResult<string, Metadata>>>;
        getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
            key: Key[],
            type: "json",
        ): Promise<
            Map<string, KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>,
        >;
        getWithMetadata<Metadata = unknown>(
            key: Key[],
            options?: Partial<KVNamespaceGetOptions<undefined>>,
        ): Promise<Map<string, KVNamespaceGetWithMetadataResult<string, Metadata>>>;
        getWithMetadata<Metadata = unknown>(
            key: Key[],
            options?: KVNamespaceGetOptions<"text">,
        ): Promise<Map<string, KVNamespaceGetWithMetadataResult<string, Metadata>>>;
        getWithMetadata<ExpectedValue = unknown, Metadata = unknown>(
            key: Key[],
            options?: KVNamespaceGetOptions<"json">,
        ): Promise<
            Map<string, KVNamespaceGetWithMetadataResult<ExpectedValue, Metadata>>,
        >;
        list<Metadata = unknown>(
            options?: KVNamespaceListOptions,
        ): Promise<KVNamespaceListResult<Metadata, Key>>;
        put(
            key: Key,
            value:
                | string
                | ReadableStream<any>
                | ArrayBuffer
                | ArrayBufferView<ArrayBufferLike>,
            options?: KVNamespacePutOptions,
        ): Promise<void>;
    }

    Type Parameters

    • Key extends string = string
    Index

    Methods

    • Parameters

      Returns Promise<void>

    • Parameters

      Returns Promise<string | null>

    • Parameters

      • key: Key
      • type: "text"

      Returns Promise<string | null>

    • Type Parameters

      • ExpectedValue = unknown

      Parameters

      • key: Key
      • type: "json"

      Returns Promise<ExpectedValue | null>

    • Parameters

      • key: Key
      • type: "arrayBuffer"

      Returns Promise<ArrayBuffer | null>

    • Parameters

      • key: Key
      • type: "stream"

      Returns Promise<ReadableStream<any> | null>

    • Parameters

      Returns Promise<string | null>

    • Type Parameters

      • ExpectedValue = unknown

      Parameters

      Returns Promise<ExpectedValue | null>

    • Parameters

      Returns Promise<ArrayBuffer | null>

    • Parameters

      Returns Promise<ReadableStream<any> | null>

    • Parameters

      • key: Key[]
      • type: "text"

      Returns Promise<Map<string, string | null>>

    • Type Parameters

      • ExpectedValue = unknown

      Parameters

      • key: Key[]
      • type: "json"

      Returns Promise<Map<string, ExpectedValue | null>>

    • Parameters

      Returns Promise<Map<string, string | null>>

    • Parameters

      Returns Promise<Map<string, string | null>>

    • Type Parameters

      • ExpectedValue = unknown

      Parameters

      Returns Promise<Map<string, ExpectedValue | null>>

    • Parameters

      • key: Key
      • value: string | ReadableStream<any> | ArrayBuffer | ArrayBufferView<ArrayBufferLike>
      • Optionaloptions: KVNamespacePutOptions

      Returns Promise<void>