Skip to content

whatwg-fetch error #12582

Closed
Closed

Description

@aegyed91

I use these 2 type definitions alongside:

"@types/service_worker_api": "0.0.5",
"@types/whatwg-fetch": "0.0.32",

The error i get in typecheck:

[default] /home/tsm/Sites/deploy-fe/node_modules/@types/whatwg-fetch/index.d.ts:47:5 
    Subsequent variable declarations must have the same type.  Variable 'headers' must be of type 'Header', but here has type 'Headers'.
[default] /home/tsm/Sites/deploy-fe/node_modules/@types/whatwg-fetch/index.d.ts:53:5 
    Subsequent variable declarations must have the same type.  Variable 'mode' must be of type 'string', but here has type 'RequestMode'.
[default] /home/tsm/Sites/deploy-fe/node_modules/@types/whatwg-fetch/index.d.ts:54:5 
    Subsequent variable declarations must have the same type.  Variable 'credentials' must be of type 'string', but here has type 'RequestCredentials'.
[default] /home/tsm/Sites/deploy-fe/node_modules/@types/whatwg-fetch/index.d.ts:55:5 
    Subsequent variable declarations must have the same type.  Variable 'cache' must be of type 'string', but here has type 'RequestCache'.
[default] /home/tsm/Sites/deploy-fe/node_modules/@types/whatwg-fetch/index.d.ts:90:5 
    Subsequent variable declarations must have the same type.  Variable 'type' must be of type 'string', but here has type 'ResponseType'.
[default] /home/tsm/Sites/deploy-fe/node_modules/@types/whatwg-fetch/index.d.ts:96:5 
    Subsequent variable declarations must have the same type.  Variable 'headers' must be of type 'Header', but here has type 'Headers'.

Activity

  1. vvakame commented on Nov 13, 2016

    @vvakame
    Member

    please send a pull request. I'll review it.

  2. dolphin-wood commented on Dec 9, 2016

    @dolphin-wood
    Contributor

    This appears to be an issue with service_worker_api, see #12476

  3. orta commented on Jun 7, 2021

    @orta
    Collaborator

    Hi thread, we're moving DefinitelyTyped to use GitHub Discussions for conversations the @types modules in DefinitelyTyped.

    To help with the transition, we're closing all issues which haven't had activity in the last 6 months, which includes this issue. If you think closing this issue is a mistake, please pop into the TypeScript Community Discord and mention the issue in the definitely-typed channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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