Skip to content

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Oct 5, 2023

See code comment and linked issue comments for description.

Fixes #55607

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 5, 2023
@andrewbranch andrewbranch requested a review from gabritto October 5, 2023 22:07
* ```
*/
function isContextualKeywordInAutoImportableExpressionSpace(keyword: string) {
return keyword === "abstract" ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think canonically we'd use a switch for this (faster at runtime I assume).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn’t we move the visitor API off a switch and onto a lookup table for performance reasons?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, this list seems small enough and is unlikely to grow

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that was for a different reason IIRC, the function was so big that it didn't optimize with so many cases handled inside of it

@andrewbranch andrewbranch merged commit 5001433 into main Oct 5, 2023
@andrewbranch andrewbranch deleted the bug/55607 branch October 5, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing type keyword completion causes auto-import of type symbol
4 participants