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
Hello!
Lately I was intrigued with the need to use syntax like (0, expr) for imports from modules to make sure it does not called on module import as this.
So, what exactly happen if this proposal will be adopted, and following construct will be applied:
to explicitly say "I want to call importFunc as independent function without relation to module1 import reference", with undefined this?
May be, :> can be used to call member method with undefined this and -> to call some method with left operand of this, like
module1:>importedFunc("a",true,1, ...[1,2,3]);//call `importedFunc` with `this` set to `window`window->module1.importedFunc("a",true,1, ...[1,2,3]);//here call `module1.libFactory` first decoupled from `module1` importwindow->(module1:>libFactory().importedFunc)("a",true,1, ...[1,2,3]);
Thanks for reading this.
The text was updated successfully, but these errors were encountered:
That seems like a different proposal, and I’m very skeptical that there’s a use case for it outside of transpiler output, since in actual user code, this is done by destructuring the function in one statement, and calling it in the next.
Hello!
Lately I was intrigued with the need to use syntax like
(0, expr)
for imports from modules to make sure it does not called on module import asthis
.So, what exactly happen if this proposal will be adopted, and following construct will be applied:
What if this proposal can be extended to either
or
to explicitly say "I want to call
importFunc
as independent function without relation tomodule1
import reference", with undefined this?May be,
:>
can be used to call member method withundefined
this and->
to call some method with left operand of this, likeThanks for reading this.
The text was updated successfully, but these errors were encountered: