-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Fix isolatedModules check for export assignments #57148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,25 @@ | ||||||||||||
// @isolatedModules: true | ||||||||||||
// @noEmit: true | ||||||||||||
// @noTypesAndSymbols: true | ||||||||||||
|
||||||||||||
// @Filename: /events.d.ts | ||||||||||||
declare module "events" { | ||||||||||||
interface EventEmitterOptions { | ||||||||||||
captureRejections?: boolean; | ||||||||||||
} | ||||||||||||
class EventEmitter { | ||||||||||||
constructor(options?: EventEmitterOptions); | ||||||||||||
} | ||||||||||||
export = EventEmitter; | ||||||||||||
} | ||||||||||||
declare module "node:events" { | ||||||||||||
import events = require("events"); | ||||||||||||
export = events; | ||||||||||||
} | ||||||||||||
|
||||||||||||
// @Filename: /moreEvents.ts | ||||||||||||
import events = require("events"); | ||||||||||||
export = events; | ||||||||||||
|
||||||||||||
// @Filename: /boo.ts | ||||||||||||
// Bad test runner (ignores stuff when last file contains the string r-e-q-u-i-r-e) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am definitely curious about this one... 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The absolute worst TypeScript/src/testRunner/compilerRunner.ts Lines 238 to 242 in 25a4f9e
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow, this is bogus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknownSymbol.flags === SymbolFlags.All
, so while this check was necessary before, it’s now redundant with!(nonLocalMeanings & SymbolFlags.Value)
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're actually equal to
All
? I thought that it wasSymbolFlags.Property
for this symbol.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, oops, you’re right. At any rate, it’s still redundant with
!(nonLocalMeanings & SymbolFlags.Value)
, but I’m glad to fix that memory