We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: master (fc1f6e3)
Code
type X = { a?: any; b: any; } type Keys = keyof X; type Direct = { [K in keyof X]: any; } // type Direct = { // a?: any; - optional // b: any; // } type WithAlias = { [K in Keys]: any; } // type WithAlias = { // a: any; - required // b: any; // }
Expected behavior: Types Direct and WithAlias have the same a property. I think that a property must be required in both Direct and WithAlias types.
Direct
WithAlias
a
Actual behavior: Types Direct and WithAlias have different a property (optional and required).
The text was updated successfully, but these errors were encountered:
This is working as intended. See #12563.
Sorry, something went wrong.
No branches or pull requests
TypeScript Version: master (fc1f6e3)
Code
Expected behavior:
Types
Direct
andWithAlias
have the samea
property. I think thata
property must be required in bothDirect
andWithAlias
types.Actual behavior:
Types
Direct
andWithAlias
have differenta
property (optional and required).The text was updated successfully, but these errors were encountered: