From 1b506673bb6d398aeb76eff73b4f2f4495249a00 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 29 Sep 2014 15:20:36 -0700 Subject: [PATCH] :memo: update --- src/config.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/config.coffee b/src/config.coffee index 749d6b1df..c3a87cfbb 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -322,8 +322,6 @@ class Config # * `keyPath` {String} name of the key to observe # * `callback` {Function} to call when the value of the key changes. # * `value` the new value of the key - # * `event` {Object} - # * `previous` the prior value of the key. # # Returns a {Disposable} with the following keys on which you can call # `.dispose()` to unsubscribe. @@ -340,13 +338,15 @@ class Config @emitter.on 'did-change', (event) => callback(event.newValue) if keyPath? and keyPath.indexOf(event?.keyPath) is 0 - # Essential: Add a listener for changes to a given key path. + # Essential: Add a listener for changes to a given key path. If `keyPath` is + # not specified, your callback will be called on changes to any key. # - # * `keyPath` {String} name of the key to observe + # * `keyPath` (optional) {String} name of the key to observe # * `callback` {Function} to call when the value of the key changes. - # * `value` the new value of the key # * `event` {Object} - # * `previous` the prior value of the key. + # * `newValue` the new value of the key + # * `oldValue` the prior value of the key. + # * `keyPath` the keyPath of the changed key # # Returns a {Disposable} with the following keys on which you can call # `.dispose()` to unsubscribe.