mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Correct config.coffee doc references to scope
The scope selector is referred to with the key `scope` on the options object, not `scopeDescriptor` as the current docs claim. Reference `scope` correctly. Mark `options` as optional for `::observe` because the arguments collection is checked for length, and a length of 2 assumes the second argument is `callback`. `options` is actually optional.
This commit is contained in:
@@ -381,8 +381,8 @@ class Config
|
||||
# ```
|
||||
#
|
||||
# * `keyPath` {String} name of the key to observe
|
||||
# * `options` {Object}
|
||||
# * `scopeDescriptor` (optional) {ScopeDescriptor} describing a path from
|
||||
# * `options` (optional) {Object}
|
||||
# * `scope` (optional) {ScopeDescriptor} describing a path from
|
||||
# the root of the syntax tree to a token. Get one by calling
|
||||
# {editor.getLastCursor().getScopeDescriptor()}. See {::get} for examples.
|
||||
# See [the scopes docs](https://atom.io/docs/latest/behind-atom-scoped-settings-scopes-and-scope-descriptors)
|
||||
@@ -412,8 +412,8 @@ class Config
|
||||
#
|
||||
# * `keyPath` (optional) {String} name of the key to observe. Must be
|
||||
# specified if `scopeDescriptor` is specified.
|
||||
# * `optional` (optional) {Object}
|
||||
# * `scopeDescriptor` (optional) {ScopeDescriptor} describing a path from
|
||||
# * `options` (optional) {Object}
|
||||
# * `scope` (optional) {ScopeDescriptor} describing a path from
|
||||
# the root of the syntax tree to a token. Get one by calling
|
||||
# {editor.getLastCursor().getScopeDescriptor()}. See {::get} for examples.
|
||||
# See [the scopes docs](https://atom.io/docs/latest/behind-atom-scoped-settings-scopes-and-scope-descriptors)
|
||||
|
||||
Reference in New Issue
Block a user