docs: add return type for subscribeNotification (#15490)

This commit is contained in:
Samuel Attard 2018-11-01 01:24:50 +11:00 committed by John Kleinschmidt
parent 6d2a088be9
commit 86064a7bd8

View file

@ -89,6 +89,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
@ -112,6 +114,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`.