-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Spread operator not transpiled when used in a default value #35771
Comments
6 tasks
fzaninotto
added a commit
to marmelab/react-admin
that referenced
this issue
Dec 19, 2019
Caused by TypeScript bug microsoft/TypeScript#35771 Refs #4116
justinr1234
pushed a commit
to justinr1234/react-admin
that referenced
this issue
Dec 22, 2019
Caused by TypeScript bug microsoft/TypeScript#35771 Refs marmelab#4116
ajafff
added a commit
to ajafff/TypeScript
that referenced
this issue
Dec 27, 2019
…turing with rest fixes: microsoft#35771
Fix is up at #35872 |
JulienMattiussi
pushed a commit
to marmelab/react-admin
that referenced
this issue
Jan 28, 2020
Caused by TypeScript bug microsoft/TypeScript#35771 Refs #4116
JulienMattiussi
pushed a commit
to marmelab/react-admin
that referenced
this issue
Jan 31, 2020
Caused by TypeScript bug microsoft/TypeScript#35771 Refs #4116
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TypeScript Version: 3.7.3 + online playground
Search Terms: spread, rest, object assign
Code
Expected behavior:
The spread operator in the default value for
mutators
({ ...arrayMutators }
) should be transpiled toObject.assign
when the compilation target is ES5.Actual behavior:
The transpiled code includes a spread operator, which isn't valid ES5:
Playground Link: https://www.typescriptlang.org/play/index.html?target=1&jsx=2&module=1&ssl=11&ssc=1&pln=1&pc=1#code/JYWwDg9gTgLgBAQylBBPAsgVxgm0DOcAZlBCHAORHAB2CANgLRHQiNIqr4UDcAUHwDGEGvngAxVgHVgMABYAlAKYATYFCWD4AXjgAKAN584JuCGy4CcXQbgA6BxzRYceKIQC+AGmOmHdsFIwfD4PAEprAD44I1M4YVEIeiU7eggAcz1zVwIw0P4+JQAPSFg4FSUiBEx6CWlZRVV1TRh+IA
Related Issues: None
The text was updated successfully, but these errors were encountered: