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
{{ message }}
Repository navigation
Type inference corner case in combination of object spread with destructuring #12532
Code to typecheck. The resulting key const should be a shallow copy of keyPrototype, with certain keys overridden by the result of getKeyData.
Actual behavior:
Error on the key declaration inside const { key }: "Initializer provides no value for this binding element and the binding element has no default value", despite the RHS being guaranteed to always have a key key.
Activity
Remove special symbol for untyped modules
DarylCantrell commentedon Jun 12, 2017
This is probably a duplicate. In TSX file, this works fine:
When I try to do this, I get the same error you're seeing:
Works if I supply a default value, but I don't think it should require one:
robyoder commentedon Oct 5, 2017
I'm having this issue as well.
robyoder commentedon Dec 31, 2017
This appears to be fixed in version
2.7.0-dev.20171230. Perhaps by #19513? Recommend for closing.sandersn commentedon Jan 2, 2018
Yep, original repro works now.