-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Error on types named "undefined" #57575
Conversation
@typescript-bot test top400 |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 7e0ddf4. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 7e0ddf4. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 7e0ddf4. You can monitor the build here. Update: The results are in! |
Hopefully nobody 😅 |
@jakebailey Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
FWIW the way I wanted to implement this was "if you see an |
Hey @jakebailey, the results of running the DT tests are ready. |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
Good, nobody! |
Well, given #57573 is now effectively accepted, I guess I'll clean this up? |
Apparently I'm dumb and didn't realize that we already issue this error:
I just added a duplicate one. The actual problem are the other ones we're missing. |
Yeah, I did not test what I thought I was. |
Okay, I sorta tested the right thing. This check is duplicative, but I didn't ignore this in globals, so I did actually check the right thing, kinda. |
7e0ddf4
to
9fed7d1
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@typescript-bot test top400 |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at b376d0b. You can monitor the build here. Update: The results are in! |
Okay, this should be ready. Removed the namespace stuff as discussed. |
@typescript-bot test top400 @typescript-bot perf test this faster |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 7b80d7a. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the faster perf test suite on this PR at 7b80d7a. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the tarball bundle task on this PR at 7b80d7a. You can monitor the build here. |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 7b80d7a. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 7b80d7a. You can monitor the build here. |
@@ -2720,20 +2717,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { | |||
} | |||
} | |||
|
|||
function addToSymbolTable(target: SymbolTable, source: SymbolTable, message: DiagnosticMessage) { |
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.
I opted to eliminate builtinGlobals while here; its only use is to complain about undefined, but now we're going to complain even less and the new code had to exclude type declarations anyway.
Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
Hey @jakebailey, the results of running the DT tests are ready. |
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
Abusing this PR to try out a cherry-pick with the new bot. @typescript-bot cherry-pick this to release-5.4 |
Hey, @jakebailey! I've created #57610 for you. |
Fixes #57573
This makes us error on types named
undefined
in the same way we do keyword types. Though undefined is not a keyword, it is a keyword in type space.