Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add return type for subscribeNotification (backport: 4-0-x) #15500

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/api/system-preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,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
Expand All @@ -106,6 +108,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`.
Expand Down