-
Notifications
You must be signed in to change notification settings - Fork 12.8k
"in keyof" type mapping incorrectly interacts with indexers #42436
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
Comments
By design. Due to the indexer every See #41966 for a workaround (omit the index signature). |
I don't think that's where my problem was. It's in |
Oh nevermind, I understand what you're saying now. It's the |
Bug Report
π Search Terms
Indexer
Type mapping
Type resolution
Typing
π Version & Regression Information
All versions available on the Typescript workbench.
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
RequiredMembers<BrokenExampleType>
resolves toundefined
.π Expected behavior
RequiredMembers<BrokenExampleType>
resolves to"requiredString" | "requiredNumber"
The text was updated successfully, but these errors were encountered: