Skip to content

Chore: Use arrow functions where possible (lexical this). #7414

Closed
@originalfoo

Description

@originalfoo
  • Version: 6.2.1
  • Platform:
  • Subsystem: various

Following on from #7295, I've spotted similar pattern in many other files:

var self = this;
something(someFunc(...) {
  self.whatever();
});

In most scenarios, this pattern can be replaced with an arrow function, allowing removal of 'self' var:

something((...) => {
  this.whatever();
});

I'd like to use this issue ticket as a hub for several commits/PRs relating to this (one changed file per PR, although there may be several commits in the PR - one for each arrow function implemented in the file).

Metadata

Metadata

Assignees

No one assigned

    Labels

    lib / srcIssues and PRs related to general changes in the lib or src directory.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions