es-explicit-this icon indicating copy to clipboard operation
es-explicit-this copied to clipboard

Explicit this naming in ECMAScript functions

Results 6 es-explicit-this issues
Sort by recently updated
recently updated
newest added

TypeScript do not allow `this` parameter in constructor. ```ts class Test { constructor(this: any) { //

I don't see much use cases of `function f(this = value) {}` in the wild, because it's impossible to invoke `undefined.foo()` anyway, and we already ban `f()` if f is...

Related to #8 , non-strict functions behave like `function (this = this == null ? globalThis : Object(this))`, shall we adjust the semantics for non-strict functions using explicit `this` syntax?...

``` function ::zip (array, otherArray) { return array.map( (a, i) => [a, otherArray[i]] ) } function ::flatten (subject) { return subject.reduce( (a,b) => a.concat(b) ) } [10,20] ::zip( [1,2] )...