Review main Merged

64341[TASK] Use proper TypeScript functions instead of arrow functions

Oliver Hader CR +2 V +2 Easy +13 −13 updated 04/29/20, 17:51

Commit message

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Benni Mack +2
    • Markus Klein +1
  • Verified V +2 Done
    • Oliver Hader +2
    • TYPO3com +1 CI

Issues 1

Files 2

Review log 1012

  1. Oliver Hader uploaded patch set 1 04/28/20, 20:19

  2. TYPO3com voted on patch set 1 V +1 04/28/20, 20:31 Completed build in 11m 44s on Tue, 28 Apr, 08:31 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3098

  3. Andreas Kienast commented on patch set 1 CR -1 04/28/20, 21:02

    Login.ts:62

    Will this work? showLoadingIndicator() is used as event listener, this might be bound to the element the event is bound to

    Login.ts:152

    .bind(this) missing?
  4. Oliver Hader uploaded patch set 2 04/28/20, 22:22

  5. Oliver Hader commented on patch set 2 04/28/20, 22:22

    Login.ts:152 Reply Unresolved

    Thx, forgot that one
  6. Oliver Hader commented on patch set 2 04/28/20, 22:29

    Login.ts:62 Reply

    Now with correct scope binding it's like before... since this.options refers to class members. Arrow functions do not define their own `this` scope, but use the local/surrounding scope (which was the class instance being `this` before). Now, with having binding in place at event registration (your 2nd comment), it's like before...
  7. TYPO3com voted on patch set 2 V +1 04/28/20, 22:34 Completed build in 11m 41s on Tue, 28 Apr, 10:34 PM Test Summary: 73663 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3099

  8. Oliver Hader commented on patch set 2 04/28/20, 22:38

    Login.ts:62 Reply Unresolved

    If your comment was on `private`, it also works (with future ES, having proper instance visibility in place), since the reference to the function is passed - it would be different though, if the object's method would be called from outside the class. Our current build process just strips private/protected since it's not supported with ES6. Maybe we might give it a try with Babel7 some day...
  9. Markus Klein voted on patch set 2 CR +1 04/29/20, 08:58

  10. Benni Mack voted on patch set 2 CR +2 04/29/20, 13:36

  11. Oliver Hader commented on patch set 2 V +2 CR +2 04/29/20, 17:51

    Yolo!
  12. Oliver Hader merged patch set 3 04/29/20, 17:51