Unified · Split
| @@ -5,15 +5,11 @@ · 4 unmodified lines | ||
| 5 | 5 | * DS102: Remove unnecessary code created because of implicit returns |
| 6 | 6 | * DS103: Rewrite code to no longer use __guard__, or convert again using --optional-chaining |
| 7 | 7 | * DS205: Consider reworking code to avoid use of IIFEs |
| 8 | − * DS206: Consider reworking classes to avoid initClass | |
| 9 | 8 | * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md |
| 10 | 9 | */ |
| 11 | −app.Shortcuts = class Shortcuts { | |
| 12 | − static initClass() { | |
| 13 | − $.extend(this.prototype, Events); | |
| 14 | − } | |
| 15 | − | |
| 10 | +app.Shortcuts = class Shortcuts extends Events { | |
| 16 | 11 | constructor() { |
| 12 | + super(); | |
| 17 | 13 | this.onKeydown = this.onKeydown.bind(this); |
| 18 | 14 | this.onKeypress = this.onKeypress.bind(this); |
| 19 | 15 | this.isMac = $.isMac(); |
| @@ -306,7 +302,6 @@ app.Shortcuts = class Shortcuts { · 286 unmodified lines | ||
| 306 | 302 | } |
| 307 | 303 | } |
| 308 | 304 | }; |
| 309 | −app.Shortcuts.initClass(); | |
| 310 | 305 | |
| 311 | 306 | function __guard__(value, transform) { |
| 312 | 307 | return typeof value !== "undefined" && value !== null |