mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 16:34:14 +01:00
Use [foo] instead of foo[] consistently in source doc type annotations.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* E.g. an abbreviation with a LHS of "gop" and RHS of "Grand Old Party" will
|
||||
* replace the former with the latter.
|
||||
*
|
||||
* @param {Mode[]} modes The modes in which this abbreviation is active.
|
||||
* @param {[Mode]} modes The modes in which this abbreviation is active.
|
||||
* @param {string} lhs The left hand side of the abbreviation; the text to
|
||||
* be replaced.
|
||||
* @param {string|function(nsIEditor):string} rhs The right hand side of
|
||||
@@ -53,7 +53,7 @@ var Abbreviation = Class("Abbreviation", {
|
||||
/**
|
||||
* Returns true if this abbreviation is defined for all *modes*.
|
||||
*
|
||||
* @param {Mode[]} modes The modes to test.
|
||||
* @param {[Mode]} modes The modes to test.
|
||||
* @returns {boolean} The result of the comparison.
|
||||
*/
|
||||
modesEqual: function (modes) array.equals(this.modes, modes),
|
||||
@@ -69,7 +69,7 @@ var Abbreviation = Class("Abbreviation", {
|
||||
/**
|
||||
* Returns true if this abbreviation is defined in any of *modes*.
|
||||
*
|
||||
* @param {Modes[]} modes The modes to test.
|
||||
* @param {[Modes]} modes The modes to test.
|
||||
* @returns {boolean} The result of the comparison.
|
||||
*/
|
||||
inModes: function (modes) modes.some(function (mode) this.inMode(mode), this),
|
||||
@@ -135,7 +135,7 @@ var AbbrevHive = Class("AbbrevHive", Contexts.Hive, {
|
||||
},
|
||||
|
||||
/**
|
||||
* @property {Abbreviation[]} The list of the abbreviations merged from
|
||||
* @property {[Abbreviation]} The list of the abbreviations merged from
|
||||
* each mode.
|
||||
*/
|
||||
get merged() {
|
||||
@@ -253,7 +253,7 @@ var Abbreviations = Module("abbreviations", {
|
||||
*
|
||||
* @param {Array} modes List of modes.
|
||||
* @param {string} lhs The LHS of the abbreviation.
|
||||
* @param {Hive[]} hives List of hives.
|
||||
* @param {[Hive]} hives List of hives.
|
||||
* @optional
|
||||
*/
|
||||
list: function (modes, lhs, hives) {
|
||||
|
||||
@@ -47,7 +47,7 @@ var AutoCmdHive = Class("AutoCmdHive", Contexts.Hive, {
|
||||
*
|
||||
* @param {string} event The event name filter.
|
||||
* @param {string} pattern The URL pattern filter.
|
||||
* @returns {AutoCommand[]}
|
||||
* @returns {[AutoCommand]}
|
||||
*/
|
||||
get: function (event, pattern) {
|
||||
return this._store.filter(function (autoCmd) autoCmd.match(event, regexp));
|
||||
@@ -89,7 +89,7 @@ var AutoCommands = Module("autocommands", {
|
||||
*
|
||||
* @param {string} event The event name filter.
|
||||
* @param {string} regexp The URL pattern filter.
|
||||
* @param {Hive[]} hives List of hives.
|
||||
* @param {[Hive]} hives List of hives.
|
||||
* @optional
|
||||
*/
|
||||
list: function (event, regexp, hives) {
|
||||
|
||||
@@ -1306,7 +1306,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
* ['www.google.com/search?q=bla', 'www.osnews.com']
|
||||
*
|
||||
* @param {string} str
|
||||
* @returns {string[]}
|
||||
* @returns {[string]}
|
||||
*/
|
||||
parseURLs: function parseURLs(str) {
|
||||
let urls;
|
||||
@@ -1506,7 +1506,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
},
|
||||
|
||||
/**
|
||||
* @property {Window[]} Returns an array of all the host application's
|
||||
* @property {[Window]} Returns an array of all the host application's
|
||||
* open windows.
|
||||
*/
|
||||
get windows() [win for (win in iter(services.windowMediator.getEnumerator("navigator:browser"))) if (win.dactyl)],
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
* A class representing key mappings. Instances are created by the
|
||||
* {@link Mappings} class.
|
||||
*
|
||||
* @param {Modes.Mode[]} modes The modes in which this mapping is active.
|
||||
* @param {string[]} keys The key sequences which are bound to
|
||||
* @param {[Modes.Mode]} modes The modes in which this mapping is active.
|
||||
* @param {[string]} keys The key sequences which are bound to
|
||||
* *action*.
|
||||
* @param {string} description A short one line description of the key mapping.
|
||||
* @param {function} action The action invoked by each key sequence.
|
||||
@@ -44,7 +44,7 @@ var Map = Class("Map", {
|
||||
|
||||
name: Class.memoize(function () this.names[0]),
|
||||
|
||||
/** @property {string[]} All of this mapping's names (key sequences). */
|
||||
/** @property {[string]} All of this mapping's names (key sequences). */
|
||||
names: Class.memoize(function () this._keys.map(function (k) events.canonicalKeys(k))),
|
||||
|
||||
get toStringParams() [this.modes.map(function (m) m.name), this.names.map(String.quote)],
|
||||
@@ -53,7 +53,7 @@ var Map = Class("Map", {
|
||||
|
||||
/** @property {number} A unique ID for this mapping. */
|
||||
id: null,
|
||||
/** @property {Modes.Mode[]} All of the modes for which this mapping applies. */
|
||||
/** @property {[Modes.Mode]} All of the modes for which this mapping applies. */
|
||||
modes: null,
|
||||
/** @property {function (number)} The function called to execute this mapping. */
|
||||
action: null,
|
||||
@@ -156,8 +156,8 @@ var MapHive = Class("MapHive", Contexts.Hive, {
|
||||
/**
|
||||
* Adds a new key mapping.
|
||||
*
|
||||
* @param {Modes.Mode[]} modes The modes that this mapping applies to.
|
||||
* @param {string[]} keys The key sequences which are bound to *action*.
|
||||
* @param {[Modes.Mode]} modes The modes that this mapping applies to.
|
||||
* @param {[string]} keys The key sequences which are bound to *action*.
|
||||
* @param {string} description A description of the key mapping.
|
||||
* @param {function} action The action invoked by each key sequence.
|
||||
* @param {Object} extra An optional extra configuration hash.
|
||||
@@ -348,8 +348,8 @@ var Mappings = Module("mappings", {
|
||||
/**
|
||||
* Adds a new default key mapping.
|
||||
*
|
||||
* @param {Modes.Mode[]} modes The modes that this mapping applies to.
|
||||
* @param {string[]} keys The key sequences which are bound to *action*.
|
||||
* @param {[Modes.Mode]} modes The modes that this mapping applies to.
|
||||
* @param {[string]} keys The key sequences which are bound to *action*.
|
||||
* @param {string} description A description of the key mapping.
|
||||
* @param {function} action The action invoked by each key sequence.
|
||||
* @param {Object} extra An optional extra configuration hash.
|
||||
@@ -370,8 +370,8 @@ var Mappings = Module("mappings", {
|
||||
/**
|
||||
* Adds a new user-defined key mapping.
|
||||
*
|
||||
* @param {Modes.Mode[]} modes The modes that this mapping applies to.
|
||||
* @param {string[]} keys The key sequences which are bound to *action*.
|
||||
* @param {[Modes.Mode]} modes The modes that this mapping applies to.
|
||||
* @param {[string]} keys The key sequences which are bound to *action*.
|
||||
* @param {string} description A description of the key mapping.
|
||||
* @param {function} action The action invoked by each key sequence.
|
||||
* @param {Object} extra An optional extra configuration hash (see
|
||||
@@ -399,7 +399,7 @@ var Mappings = Module("mappings", {
|
||||
*
|
||||
* @param {Modes.Mode} mode The mode to search.
|
||||
* @param {string} prefix The map prefix string to match.
|
||||
* @returns {Map[]}
|
||||
* @returns {[Map]}
|
||||
*/
|
||||
getCandidates: function (mode, prefix)
|
||||
this.hives.map(function (h) h.getCandidates(mode, prefix))
|
||||
@@ -409,7 +409,7 @@ var Mappings = Module("mappings", {
|
||||
* Lists all user-defined mappings matching *filter* for the specified
|
||||
* *modes* in the specified *hives*.
|
||||
*
|
||||
* @param {Modes.Mode[]} modes An array of modes to search.
|
||||
* @param {[Modes.Mode]} modes An array of modes to search.
|
||||
* @param {string} filter The filter string to match. @optional
|
||||
* @param {[MapHive]} hives The map hives to list. @optional
|
||||
*/
|
||||
|
||||
@@ -152,7 +152,7 @@ var Tabs = Module("tabs", {
|
||||
get localStore() this.getLocalStore(),
|
||||
|
||||
/**
|
||||
* @property {Object[]} The array of closed tabs for the current
|
||||
* @property {[Object]} The array of closed tabs for the current
|
||||
* session.
|
||||
*/
|
||||
get closedTabs() JSON.parse(services.sessionStore.getClosedTabData(window)),
|
||||
|
||||
Reference in New Issue
Block a user