docs: add return type for subscribeNotification (#15499)

This commit is contained in:
trop[bot] 2018-10-31 09:48:33 -07:00 committed by Shelley Vohr
parent fd97fcf6f0
commit 3e8b854975

View file

@ -75,6 +75,8 @@ that contains the user information dictionary sent along with the notification.
* `callback` Function
* `event` String
* `userInfo` Object
Returns `Number` - The ID of this subscription
Subscribes to native notifications of macOS, `callback` will be called with
`callback(event, userInfo)` when the corresponding `event` happens. The
@ -98,6 +100,8 @@ example values of `event` are:
* `callback` Function
* `event` String
* `userInfo` Object
Returns `Number` - The ID of this subscription
Same as `subscribeNotification`, but uses `NSNotificationCenter` for local defaults.
This is necessary for events such as `NSUserDefaultsDidChangeNotification`.