[fix] AppState addEventListener returns subscription object

Close #2129
This commit is contained in:
Chris Zelenak
2021-09-16 14:22:23 -04:00
committed by Nicolas Gallagher
parent 4aba2bdcf4
commit 126642783b
4 changed files with 29 additions and 26 deletions
@@ -36,7 +36,7 @@ Returns the current state of the app.
### Static methods
{% call macro.prop('addEventListener', '(type: ?string, listener: (boolean) => void) => void') %}
{% call macro.prop('addEventListener', '(type: ?string, listener: (boolean) => void) => ?EmitterSubscription') %}
Add a listener to `AppState` changes. Listen to the `"change"` event type. The handler is called with the app state value.
{% endcall %}