Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1869678 - Use more idiomatic code patterns for better type infere…
…nce r=robwu These fall under 5 main categories: 1) Declare and/or initialize all class fiels in the constructor. (general good practise) 2) Use real getters and redefineGetter instead of defineLazyGetter. (also keeps related code closer together) 3) When subclassing, don't override class fields with getters (or vice versa). microsoft/TypeScript#33509 4) Declare and assign object literals at the same time, not separatelly. (don't use `let foo;` at the top of the file, use `var foo = {`) 5) Don't re-use local variables unnecesarily with different types. (general good practise, local variables are "free") Differential Revision: https://phabricator.services.mozilla.com/D196386 UltraBlame original commit: 8e768446e17cc306729e3b0f705b0285c69321cf
- Loading branch information