TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

AbortSignal conflict issue between @types/[email protected] and @types/[email protected]

Open cjones26 opened this issue 1 year ago • 5 comments

With the latest release of @types/[email protected] being installed side-by-side with @types/[email protected], we are receiving the following conflict:

../../node_modules/@types/node/globals.d.ts:72:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'AbortSignal' must be of type '{ new (): AbortSignal; prototype: AbortSignal; timeout(milliseconds: number): AbortSignal; }', but here has type '{ new (): AbortSignal; prototype: AbortSignal; }'.

72 declare var AbortSignal: {
               ~~~~~~~~~~~

  ../../node_modules/@typescript/lib-dom/index.d.ts:1982:13
    1982 declare var AbortSignal: {
                     ~~~~~~~~~~~
    'AbortSignal' was also declared here.


Found 1 error in ../../node_modules/@types/node/globals.d.ts:72

Any suggestions would be greatly appreciated, though we've pinned @types/[email protected] for now.

cjones26 avatar Jul 26 '22 18:07 cjones26

Just a note, the current version is 0.0.70 and the last working version is 0.0.69. (Not 0.70 and 0.69)

ornicar avatar Jul 27 '22 08:07 ornicar

Just a note, the current version is 0.0.70 and the last working version is 0.0.69. (Not 0.70 and 0.69)

Thanks, I've updated my post.

cjones26 avatar Jul 27 '22 15:07 cjones26

See also https://github.com/DefinitelyTyped/DefinitelyTyped/issues/60868 and https://github.com/DefinitelyTyped/DefinitelyTyped/pull/61412

mathe42 avatar Aug 14 '22 13:08 mathe42

#1365 added AbortSignal.timeout and that seems the cause of the conflict. #1093 worked around this last time by removing AbortSignal.abort, but not sure we should do the same here.

I'd prefer waiting #60868.

saschanaz avatar Sep 17 '22 21:09 saschanaz

Is there any workaround besides pinning @types/[email protected]?

fernandopasik avatar Sep 22 '23 18:09 fernandopasik