-
Notifications
You must be signed in to change notification settings - Fork 31
Add more than one variable arguments. #340
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
Comments
Indeed, it's misleading and we should really be providing multiple arguments. We've been typically implementing variadic arguments as ~4 arguments in the SDK ( |
@srujzs I can work on this issue. |
Thanks, go for it! Happy to review the PR and answer any questions about the translator. #339 is also related if you think it would make sense to do at the same time. |
Thanks! Just something I noticed on a quick pass: the first variadic parameter is also optional. It's allowed for an API to pass no parameters. All in one (both the Let's avoid updating the webref version as it's a breaking change and will require a new package version. I'm tempted to also investigate using subfolders for newer versions instead of releasing a new version of web. That would avoid having to migrate the whole world every time. |
Also, external int setTimeout(
TimerHandler handler,
JSAny? arguments, [
int timeout
]); new external int setTimeout(
TimerHandler handler, [
int timeout,
JSAny? argument1,
JSAny? argument2,
JSAny? argument3,
JSAny? argument4,
]); it is ok? |
(responded in PR) |
For example
Element
methods with variable arguments, instead of a single argument:generate rest arguments as optional positional arguments:
I have some cases with 2 ~ 4 arguments. Currently, I use extension types and
dart:js_interop
(target.callMethod('append'.toJS, node1, node2);
)Also,
nodes
for a single argument name sounds like it expect list of nodes, instead one node.The text was updated successfully, but these errors were encountered: