Skip to content
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

feat(25770): Bad error message for type used as index / add Quick Fix #40226

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

a-tarasyuk
Copy link
Contributor

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Aug 24, 2020
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

One suggestion for future work, but I think it's in a good state to merge.

container: cast(propertySignature.parent, isTypeLiteralNode),
typeNode: propertySignature.type,
constraint: propertyName,
name: propertyName === "K" ? "P" : "K",
Copy link
Member

Choose a reason for hiding this comment

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

This is good enough for a codefix, but I think there are better ways to create a non-conflicting name in the transformer.

@sandersn sandersn merged commit 6aec7f4 into microsoft:master Sep 8, 2020
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
Archived in project
Development

Successfully merging this pull request may close these issues.

Bad error message for type used as index
3 participants