node-webpush 🔔
    Preparing search index...

    Type Alias FetchLikeResponse

    Response shape notify() actually depends on - deliberately not the global Response type. A spec-compliant fetch implementation from outside lib.dom (undici's own fetch export is the motivating case: its Response and lib.dom's Response are structurally near-identical at runtime but not nominally assignable to each other in TS, e.g. headers.entries()'s iterator type) still satisfies this without a consumer-side cast.

    type FetchLikeResponse = {
        headers: { get(name: string): string | null };
        ok: boolean;
        status: number;
        statusText: string;
        text(): Promise<string>;
    }
    Index
    headers: { get(name: string): string | null }
    ok: boolean
    status: number
    statusText: string
    • Returns Promise<string>