isolatedModules error on global shadowed by imported type#56732
isolatedModules error on global shadowed by imported type#56732andrewbranch merged 3 commits intomicrosoft:mainfrom
Conversation
andrewbranch
left a comment
There was a problem hiding this comment.
Thanks! I think this is pretty close.
|
Thanks for the quick review! I think I addressed your comments. (Not sure about the comment resolving etiquette here. I hope me resolving them is fine?) |
|
The new error currently incorrectly fires for the following Node.js code: import { Console } from "node:console";
const c: Console = new Console();That's because Node.js typings for reference: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/420d2ceb50f728aa715da1250a2a9f27760a640c/types/node/console.d.ts#L412 Weirdly there is no error for this code: import { Console } from "node:console";
new Console();I'm going to look into that tomorrow. If you have any ideas, I'd definitely appreciate your help, @andrewbranch. |
|
Aha. I think |
|
Oh, good catch. Yeah, I think something like that should work, or alternatively a lookup with |
|
As far as I can tell this looks good now. I did not use |
|
@typescript-bot perf test this |
|
Heya @andrewbranch, I've started to run the regular perf test suite on this PR at fa03480. You can monitor the build here. Update: The results are in! |
|
Heya @andrewbranch, I've started to run the diff-based top-repos suite on this PR at fa03480. You can monitor the build here. Update: The results are in! |
|
@andrewbranch Here they are:
CompilerComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
StartupComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
@andrewbranch Here are the results of running the top-repos suite comparing Everything looks good! |
Fixes #56521
I took inspiration from #56354, which seems very similar.