-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Don't error when calling resolveEntityName
#53441
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
Conversation
@typescript-bot user test this |
Heya @gabritto, I've started to run the diff-based user code test suite on this PR at ed815a1. You can monitor the build here. Update: The results are in! |
Heya @gabritto, I've started to run the parallelized Definitely Typed test suite on this PR at ed815a1. You can monitor the build here. Update: The results are in! |
Heya @gabritto, I've started to run the diff-based top-repos suite on this PR at ed815a1. You can monitor the build here. Update: The results are in! |
@@ -45308,7 +45308,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { | |||
} | |||
|
|||
meaning |= SymbolFlags.Alias; | |||
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(name, meaning) : undefined; | |||
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(name, meaning, /*ignoreErrors*/ true) : undefined; |
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.
It's my understanding that we expect that this resolveEntityName
call might fail, judging from the if statement below and the rest of the code (and an earlier resolve call that also ignores errors)`, so we shouldn't report errors here.
@gabritto Here are the results of running the user test suite comparing Everything looks good! |
//// const x = Foo.makeFoo<{}>; //// Cannot find name 'Foo'.ts(2304) | ||
//// //// 'Foo' only refers to a type, but | ||
//// //// is being used as a namespace here.ts(2702) | ||
|
||
//// x({}); // 👍 `const x: <{}>(context: {}) => <T>(value: T) => Foo<T, {}>` |
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 think the comments are helpful for the issue, but are confusing here for the test case.
least we can do is test for stability/speed in the language service. @typescript-bot user test tsserver |
Heya @DanielRosenwasser, I've started to run the diff-based user code test suite (tsserver) on this PR at ed815a1. You can monitor the build here. Update: The results are in! |
Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite (tsserver) on this PR at ed815a1. You can monitor the build here. Update: The results are in! |
@DanielRosenwasser Here are the results of running the user test suite comparing Everything looks good! |
Hey @gabritto, the results of running the DT tests are ready. |
@gabritto Here are the results of running the top-repos suite comparing Everything looks good! |
@DanielRosenwasser Here are the results of running the top-repos suite comparing Everything looks good! |
Fixes #53247.