You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ts.transpileModule() emit has a runtime error because the imported Date either doesn't exist or doesn't have a constructor.
π Expected behavior
Same (or at least runtime equivalent) emit of transpileModule.
Additional information about the issue
I realize this code is probably not ideal. I was honestly surprised that this type-checks. I'm happy with any solution here:
Make this code an error in all configurations.
Make isolatedModules require import type.
...
The text was updated successfully, but these errors were encountered:
frigus02
changed the title
Broken ts.transpileModule() emit when imported type shadows type but not constructor of global symbol
Incorrect ts.transpileModule() emit when imported type shadows type but not constructor of global symbol
Nov 23, 2023
I've been using frigus02@cfe3335 to find and fix issues in our code base. If this comes close to an acceptable fix, I'd be happy to clean up and open a PR.
π Search Terms
transpileModule, isolatedModules
π Version & Regression Information
β― Playground Link
Bug Workbench
π» Code
π Actual behavior
Regular emit:
ts.transpileModule()
emit:The
ts.transpileModule()
emit has a runtime error because the importedDate
either doesn't exist or doesn't have a constructor.π Expected behavior
Same (or at least runtime equivalent) emit of transpileModule.
Additional information about the issue
I realize this code is probably not ideal. I was honestly surprised that this type-checks. I'm happy with any solution here:
isolatedModules
requireimport type
.The text was updated successfully, but these errors were encountered: