Closed as not planned
Description
openedon Jun 14, 2015
Edit from @DanielRosenwasser: Since this issue was filed, a separate proposal for ::
was created called "extensions".
https://github.com/tc39/proposal-extensions
It will be great if TypeScript had an implementation of the "::" bind operator of ECMAScript 7. Some examples of this operator and the implementation in ES5:
Bind
// ES5
var log = console.log.bind(console);
// ES7
let log = ::console.log;
Call
// ES5
var forEach = Array.prototype.forEach,
elements = document.querySelectorAll("div");
forEach.call(elements, div => { console.log(div); })
// ES7
let forEach = Array.prototype.forEach,
elements = document.querySelectorAll("div");
elements::forEach(div => { console.log(div) });
[ref] [more examples]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment