Open eladb opened 1 year ago
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Feature Spec
Keyword arguments are not positional by definition, and there could be stylistic reasons to want to put them before positional arguments.
Consider (beautiful):
Versus (ugly):
To complement this behavior, I am proposing that we also add a special syntax (I propose to use a spread
...
) to denote that a struct needs to be expanded into keyword arguments:If the spread is not specified,
opts
will not expand into keywords.For practical reasons, When importing JSII functions, we will still automatically assume that the last struct argument is expanded.
Use Cases
Ergonomics and style improvements.
Implementation Notes
No response
Component
Compiler
Community Notes