Closed
Description
Repro
{
"rules": {
"no-shadow": "error"
}
}
class NodeDomain {
private _load() {
const connection = this.connection;
return connection.loadDomains(this._domainPath, true)
.done(function (this: NodeDomain) {
this._domainLoaded = true;
this._connectionPromise = null;
const eventNames = Object.keys(connection.domainEvents[this._domainName]);
eventNames.forEach(function (this: NodeDomain, domainEvent) {
const connectionEvent = this._domainName + ":" + domainEvent + EVENT_NAMESPACE;
(connection as unknown as EventDispatcher.DispatcherEvents).on(connectionEvent, function (this: NodeDomain) {
const params = Array.prototype.slice.call(arguments, 1);
EventDispatcher.triggerWithArray(this, domainEvent, params);
}.bind(this));
}, this);
}.bind(this))
.fail(function (this: NodeDomain, err) {
console.error("[NodeDomain] Error loading domain \"" + this._domainName + "\": " + err);
}.bind(this));
}
}
Expected Result
No error
Actual Result
Error on the second and thid this: NodeDomain
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.1.0 |
@typescript-eslint/parser |
1.1.0 |
TypeScript |
3.2.4 |
ESLint |
5.13.0 |
node |
10.15.0 |
npm |
6.4.1 |
Metadata
Metadata
Assignees
Labels
Something isn't workingSomething isn't workingThis issue is with another package, not typescript-eslint itselfThis issue is with another package, not typescript-eslint itselfIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin