Skip to content

bug(node): a combination of @types/node 17.0.14 and TS 3.7.3 raises an error #58562

@antongolub

Description

@antongolub

A combination of @types/node and typescript: 3.7.3 yields:

../../node_modules/.registry.npmjs.org/@types/node/12.20.43/node_modules/@types/node/url.d.ts:137:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'URLSearchParams' must be of type '{ new (init?: string | string[][] | URLSearchParams | Record<string, string>): URLSearchParams; prototype: URLSearchParams; }', but here has type '{ new (init?: string | string[][] | URLSearchParams | Record<string, string>): URLSearchParams; prototype: URLSearchParams; toString(): string; }'.

137         var URLSearchParams: {
                ~~~~~~~~~~~~~~~

  ../../node_modules/.registry.npmjs.org/typescript/3.7.3/node_modules/typescript/lib/lib.dom.d.ts:16107:13
    16107 declare var URLSearchParams: {
                      ~~~~~~~~~~~~~~~
    'URLSearchParams' was also declared here.

Is there a good workaround for this now?

Originally posted by @aaronatbissell in #34960 (comment)

relates #34960

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