Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

domain-tasks fetch lacks response type information #1511

@RyanLamansky

Description

@RyanLamansky

The domain-tasks library has fetch returning Promise<any>, but should return a well-defined structure as the one found in lib.dom.d.ts:

Excerpt from that file:

interface Response extends Object, Body {
    readonly body: ReadableStream | null;
    readonly headers: Headers;
    readonly ok: boolean;
    readonly status: number;
    readonly statusText: string;
    readonly type: ResponseType;
    readonly url: string;
    readonly redirected: boolean;
    clone(): Response;
}

declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;

If it's intended to wrap the common fetch function perfectly, it should directly reference the types from lib.dom.d.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions