mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 00:44:14 +01:00
Use [foo] instead of foo[] consistently in source doc type annotations.
This commit is contained in:
@@ -1510,7 +1510,7 @@ var array = Class("array", Array, {
|
||||
* as such:
|
||||
* [["a", "b"], ["c", "d"]] -> { a: "b", c: "d" }
|
||||
*
|
||||
* @param {Array[]} assoc
|
||||
* @param {[Array]} assoc
|
||||
* @... {string} 0 - Key
|
||||
* @... 1 - Value
|
||||
*/
|
||||
|
||||
@@ -94,7 +94,7 @@ update(CommandOption, {
|
||||
* A class representing Ex commands. Instances are created by
|
||||
* the {@link Commands} class.
|
||||
*
|
||||
* @param {string[]} specs The names by which this command can be invoked.
|
||||
* @param {[string]} specs The names by which this command can be invoked.
|
||||
* These are specified in the form "com[mand]" where "com" is a unique
|
||||
* command name prefix.
|
||||
* @param {string} description A short one line description of the command.
|
||||
@@ -209,19 +209,19 @@ var Command = Class("Command", {
|
||||
complained: Class.memoize(function () ({})),
|
||||
|
||||
/**
|
||||
* @property {string[]} All of this command's name specs. e.g., "com[mand]"
|
||||
* @property {[string]} All of this command's name specs. e.g., "com[mand]"
|
||||
*/
|
||||
specs: null,
|
||||
/** @property {string[]} All of this command's short names, e.g., "com" */
|
||||
/** @property {[string]} All of this command's short names, e.g., "com" */
|
||||
shortNames: null,
|
||||
/**
|
||||
* @property {string[]} All of this command's long names, e.g., "command"
|
||||
* @property {[string]} All of this command's long names, e.g., "command"
|
||||
*/
|
||||
longNames: null,
|
||||
|
||||
/** @property {string} The command's canonical name. */
|
||||
name: null,
|
||||
/** @property {string[]} All of this command's long and short names. */
|
||||
/** @property {[string]} All of this command's long and short names. */
|
||||
names: null,
|
||||
|
||||
/** @property {string} This command's description, as shown in :listcommands */
|
||||
@@ -464,7 +464,7 @@ var CommandHive = Class("CommandHive", Contexts.Hive, {
|
||||
* Adds a new command to the builtin hive. Accessible only to core
|
||||
* dactyl code. Plugins should use group.commands.add instead.
|
||||
*
|
||||
* @param {string[]} specs The names by which this command can be
|
||||
* @param {[string]} specs The names by which this command can be
|
||||
* invoked. The first name specified is the command's canonical
|
||||
* name.
|
||||
* @param {string} description A description of the command.
|
||||
@@ -646,7 +646,7 @@ var Commands = Module("commands", {
|
||||
*
|
||||
* @param {string} filter Limits the list to those commands with a name
|
||||
* matching this anchored substring.
|
||||
* @param {Hive[]} hives List of hives.
|
||||
* @param {[Hive]} hives List of hives.
|
||||
* @optional
|
||||
*/
|
||||
list: function list(filter, hives) {
|
||||
|
||||
@@ -105,7 +105,7 @@ var IO = Module("io", {
|
||||
* found it is sourced. Only the first file found (per specified path) is
|
||||
* sourced unless *all* is specified, then all found files are sourced.
|
||||
*
|
||||
* @param {string[]} paths An array of relative paths to source.
|
||||
* @param {[string]} paths An array of relative paths to source.
|
||||
* @param {boolean} all Whether all found files should be sourced.
|
||||
*/
|
||||
sourceFromRuntimePath: function sourceFromRuntimePath(paths, all) {
|
||||
@@ -423,7 +423,7 @@ var IO = Module("io", {
|
||||
* Runs an external program.
|
||||
*
|
||||
* @param {File|string} program The program to run.
|
||||
* @param {string[]} args An array of arguments to pass to *program*.
|
||||
* @param {[string]} args An array of arguments to pass to *program*.
|
||||
*/
|
||||
run: function (program, args, blocking) {
|
||||
args = args || [];
|
||||
|
||||
@@ -665,9 +665,9 @@ var JavaScript = Module("javascript", {
|
||||
* time they are accessed, so they should be accessed
|
||||
* judiciously.
|
||||
*
|
||||
* @param {function|function[]} funcs The functions for which to
|
||||
* @param {function|[function]} funcs The functions for which to
|
||||
* install the completers.
|
||||
* @param {function[]} completers An array of completer
|
||||
* @param {[function]} completers An array of completer
|
||||
* functions.
|
||||
*/
|
||||
setCompleter: function (funcs, completers) {
|
||||
|
||||
@@ -25,7 +25,7 @@ let ValueError = Class("ValueError", ErrorBase);
|
||||
* A class representing configuration options. Instances are created by the
|
||||
* {@link Options} class.
|
||||
*
|
||||
* @param {string[]} names The names by which this option is identified.
|
||||
* @param {[string]} names The names by which this option is identified.
|
||||
* @param {string} description A short one line description of the option.
|
||||
* @param {string} type The option's value data type (see {@link Option#type}).
|
||||
* @param {string} defaultValue The default value for this option.
|
||||
@@ -100,14 +100,14 @@ var Option = Class("Option", {
|
||||
* "charlist" or "stringlist" or else unchanged.
|
||||
*
|
||||
* @param {value} value The option value.
|
||||
* @returns {value|string[]}
|
||||
* @returns {value|[string]}
|
||||
*/
|
||||
parse: function parse(value) Option.dequote(value),
|
||||
|
||||
/**
|
||||
* Returns *values* packed in the appropriate format for the option type.
|
||||
*
|
||||
* @param {value|string[]} values The option value.
|
||||
* @param {value|[string]} values The option value.
|
||||
* @returns {value}
|
||||
*/
|
||||
stringify: function stringify(vals) Commands.quote(vals),
|
||||
@@ -118,7 +118,7 @@ var Option = Class("Option", {
|
||||
*
|
||||
* @param {number} scope The scope to return these values from (see
|
||||
* {@link Option#scope}).
|
||||
* @returns {value|string[]}
|
||||
* @returns {value|[string]}
|
||||
*/
|
||||
get: function get(scope) {
|
||||
if (scope) {
|
||||
@@ -229,7 +229,7 @@ var Option = Class("Option", {
|
||||
* Sets the option's value using the specified set *operator*.
|
||||
*
|
||||
* @param {string} operator The set operator.
|
||||
* @param {value|string[]} values The value (or values) to apply.
|
||||
* @param {value|[string]} values The value (or values) to apply.
|
||||
* @param {number} scope The scope to apply this value to (see
|
||||
* {@link #scope}).
|
||||
* @param {boolean} invert Whether this is an invert boolean operation.
|
||||
@@ -258,7 +258,7 @@ var Option = Class("Option", {
|
||||
|
||||
/** @property {string} The option's canonical name. */
|
||||
name: null,
|
||||
/** @property {string[]} All names by which this option is identified. */
|
||||
/** @property {[string]} All names by which this option is identified. */
|
||||
names: null,
|
||||
|
||||
/**
|
||||
@@ -675,7 +675,7 @@ var Option = Class("Option", {
|
||||
* Validates the specified *values* against values generated by the
|
||||
* option's completer function.
|
||||
*
|
||||
* @param {value|string[]} values The value or array of values to validate.
|
||||
* @param {value|[string]} values The value or array of values to validate.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
validateCompleter: function validateCompleter(values) {
|
||||
@@ -825,7 +825,7 @@ var Options = Module("options", {
|
||||
/**
|
||||
* Adds a new option.
|
||||
*
|
||||
* @param {string[]} names All names for the option.
|
||||
* @param {[string]} names All names for the option.
|
||||
* @param {string} description A description of the option.
|
||||
* @param {string} type The option type (see {@link Option#type}).
|
||||
* @param {value} defaultValue The option's default value.
|
||||
|
||||
@@ -125,7 +125,7 @@ var Services = Module("Services", {
|
||||
*
|
||||
* @param {string} name The service's cache key.
|
||||
* @param {string} class The class's contract ID.
|
||||
* @param {string|string[]} ifaces The interface or array of
|
||||
* @param {string|[string]} ifaces The interface or array of
|
||||
* interfaces implemented by this service.
|
||||
* @param {string} meth The name of the function used to instantiate
|
||||
* the service.
|
||||
@@ -143,7 +143,7 @@ var Services = Module("Services", {
|
||||
*
|
||||
* @param {string} name The class's cache key.
|
||||
* @param {string} class_ The class's contract ID.
|
||||
* @param {nsISupports|nsISupports[]} ifaces The interface or array of
|
||||
* @param {nsISupports|[nsISupports]} ifaces The interface or array of
|
||||
* interfaces implemented by this class.
|
||||
* @param {string} init Name of a property or method used to initialise the
|
||||
* class. See {@link #_create}.
|
||||
|
||||
@@ -363,7 +363,7 @@ var File = Class("File", {
|
||||
*
|
||||
* @param {boolean} sort Whether to sort the returned directory
|
||||
* entries.
|
||||
* @returns {nsIFile[]}
|
||||
* @returns {[nsIFile]}
|
||||
*/
|
||||
readDirectory: function (sort) {
|
||||
if (!this.isDirectory())
|
||||
|
||||
Reference in New Issue
Block a user