typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Untyped, side-effect imports treated differently in Strada vs Corsa

Open nirrek opened this issue 7 months ago • 1 comments

We have a side-effect import of an untyped module

import 'videojs-http-source-selector';

Strada doesn't produce any type errors, presumably since no symbols are imported it doesn't care that type information can't be found.

Corsa, on the other hand, produces the following type error:

error TS2307: Cannot find module 'videojs-http-source-selector' or its corresponding type declarations.

This is trivial to fix with a simple .d.ts like this:

declare module 'videojs-http-source-selector';

Not a big issue if Corsa behaviour diverges here imo, but thought I would point out that there is a behavioural difference that means that Corsa won't be a drop-in-replacement for codebases with these types of imports.

nirrek avatar May 23 '25 12:05 nirrek

It's just a bug; this part of the code is likely being fixed in #851

jakebailey avatar May 23 '25 13:05 jakebailey

This is fixed.

jakebailey avatar Jun 04 '25 07:06 jakebailey