Skip to content

Conversation

@Andarist
Copy link
Contributor

I noticed that even though this type checks OK:

type Test1<T> = "foo" extends keyof T ? T["foo"] : never;

completions do not suggest the "foo" property. This PR fixes that :)

@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 31, 2024
Comment on lines 16722 to 16719
function getConditionalFlowTypeOfType(type: Type, node: Node) {
function getFlowTypeOfType(type: Type, node: Node) {
Copy link
Member

Choose a reason for hiding this comment

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

Why the rename?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Originally this was handling flow types in conditional types alone. Later on, this function was expanded with some logic for mapped types but the function's name was never updated. I was on the fence about renaming it but it felt like it's too specific today when perhaps it shouldn't mention conditional types given its expanded scope

@jakebailey
Copy link
Member

Seems like this PR is conflicting.

@Andarist
Copy link
Contributor Author

Seems like this PR is conflicting.

not anymore! :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

3 participants