You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
index.ts(4,7): error TS2322: Type '{ name: string; }' is not assignable to type 'Required<PersonPartial>'.
Property 'age' is missing in type '{ name: string; }'.
No, that is an unintended effect and it will no longer be the case with #12826. Also, it doesn't really work because you can't get rid of the undefined that was added to each property type by Partial<T>.
We reserve the right to make back compat breaks for things that are effectively bugs. "Things behaved differently when I added parentheses which should have been meaningless" isn't something anyone should have taken a dependency on.
Now we can make the required types using parentheses or separated definitions. Is this the spec?
TypeScript Version: master
Code
or
cc @ahejlsberg @weswigham
The text was updated successfully, but these errors were encountered: