1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-27 11:33:32 +01:00

Fix some documentation typos.

This commit is contained in:
Doug Kearns
2009-11-14 04:18:59 +11:00
parent 592305420d
commit 52562f6390
2 changed files with 38 additions and 38 deletions

View File

@@ -191,13 +191,13 @@ function call(fn) {
* curry(foo)(4)(8)(9) -> "7 8 9"; * curry(foo)(4)(8)(9) -> "7 8 9";
* *
* @param {function} fn The function to curry. * @param {function} fn The function to curry.
* @param {integer} length The number of arguments expected. * @param {integer} length The number of arguments expected.
* @default fn.length * @default fn.length
* @optional * @optional
* @param {object} self The 'this' value for the returned * @param {object} self The 'this' value for the returned function. When
* function. When omitted, the value of 'this' from the * omitted, the value of 'this' from the first call to the function is
* first call to the function is preserved. * preserved.
* @optional * @optional
*/ */
function curry(fn, length, self, acc) { function curry(fn, length, self, acc) {
if (length == null) if (length == null)
@@ -306,18 +306,18 @@ function extend(subclass, superclass, overrides) {
* specified. * specified.
* *
* @param {string} name The class's as it will appear when toString * @param {string} name The class's as it will appear when toString
* is called, as well as in stack traces. * is called, as well as in stack traces.
* @optional * @optional
* @param {function} base The base class for this module. May be any * @param {function} base The base class for this module. May be any
* callable object. * callable object.
* @optional * @optional
* @default Class * @default Class
* @param {Object} prototype The prototype for instances of this * @param {Object} prototype The prototype for instances of this
* object. The object itself is copied and not used as a * object. The object itself is copied and not used as a prototype
* prototype directly. * directly.
* @param {Object} classProperties The class properties for the new * @param {Object} classProperties The class properties for the new
* module constructor. More than one may be provided. * module constructor. More than one may be provided.
* @optional * @optional
* *
* @returns {function} The constructor for the resulting class. * @returns {function} The constructor for the resulting class.
*/ */
@@ -350,7 +350,7 @@ function Class() {
String.substr(constructor, 20) + ")"); String.substr(constructor, 20) + ")");
Constructor.name = name || superclass.name; Constructor.name = name || superclass.name;
if (!('init' in superclass.prototype)) { if (!("init" in superclass.prototype)) {
var superc = superclass; var superc = superclass;
superclass = function Shim() {} superclass = function Shim() {}
extend(superclass, superc, { extend(superclass, superc, {
@@ -384,9 +384,9 @@ Class.prototype = {
* *
* @param {function} callback The function to call after 'timeout' * @param {function} callback The function to call after 'timeout'
* @param {number} timeout The timeout, in seconds, to wait * @param {number} timeout The timeout, in seconds, to wait
* before calling 'callback'. * before calling 'callback'.
* @returns {integer} The ID of this timeout, to be passed to * @returns {integer} The ID of this timeout, to be passed to
* {@see nsIDOMWindow#clearTimeout}. * {@see nsIDOMWindow#clearTimeout}.
*/ */
setTimeout: function (callback, timeout) { setTimeout: function (callback, timeout) {
const self = this; const self = this;
@@ -433,12 +433,12 @@ const Struct = Class("Struct", {
/** /**
* Sets a lazily constructed default value for a member of * Sets a lazily constructed default value for a member of
* the struct. The value is constructed once, the first time * the struct. The value is constructed once, the first time
* it is accesed and memoized thereafter. * it is accessed and memoized thereafter.
* *
* @param {string} key The name of the member for which to * @param {string} key The name of the member for which to
* provide the default value. * provide the default value.
* @param {function} val The function which is to generate * @param {function} val The function which is to generate
* the default value. * the default value.
*/ */
Struct.defaultValue = function (key, val) { Struct.defaultValue = function (key, val) {
let i = args.indexOf(key); let i = args.indexOf(key);

View File

@@ -25,30 +25,30 @@ const ModuleBase = Class("ModuleBase", {
* entirely elided, or they must have the exact type specified. * entirely elided, or they must have the exact type specified.
* Loading semantics are as follows: * Loading semantics are as follows:
* *
* - A module is garunteed not to be initialized before any of its * - A module is guaranteed not to be initialized before any of its
* prerequisites as listed in its {@see ModuleBase#requires} member. * prerequisites as listed in its {@see ModuleBase#requires} member.
* - A module is considered initialized once its been instantiated, * - A module is considered initialized once it's been instantiated,
* it's {@see Class#init} method has been called, and its * its {@see Class#init} method has been called, and its
* instance has been installed into the top-level {@see modules} * instance has been installed into the top-level {@see modules}
* object. * object.
* - Once the module has been initialized, its module-dependent * - Once the module has been initialized, its module-dependent
* initialization functions will be called as described hereafter. * initialization functions will be called as described hereafter.
* @param {string} name The module's name as it will appear in the * @param {string} name The module's name as it will appear in the
* top-level {@see modules} object. * top-level {@see modules} object.
* @param {ModuleBase} base The base class for this module. * @param {ModuleBase} base The base class for this module.
* @optional * @optional
* @param {Object} prototype The prototype for instances of this * @param {Object} prototype The prototype for instances of this
* object. The object itself is copied and not used as a * object. The object itself is copied and not used as a prototype
* prototype directly. * directly.
* @param {Object} classProperties The class properties for the new * @param {Object} classProperties The class properties for the new
* module constructor. * module constructor.
* @optional * @optional
* @param {Object} moduleInit The module initialization functions * @param {Object} moduleInit The module initialization functions
* for the new module. Each function is called as soon as the * for the new module. Each function is called as soon as the named module
* named module has been initialized, but after the module * has been initialized, but after the module itself. The constructors are
* itself. The constructors are garunteed to be called in the * guaranteed to be called in the same order that the dependent modules
* same order that the dependent modules were initialized. * were initialized.
* @optional * @optional
* *
* @returns {function} The constructor for the resulting module. * @returns {function} The constructor for the resulting module.
*/ */
@@ -115,7 +115,7 @@ window.addEventListener("load", function () {
} }
} }
Module.list.forEach(load); Module.list.forEach(load);
deferredInit['load'].forEach(call) deferredInit["load"].forEach(call)
for (let module in values(Module.list)) for (let module in values(Module.list))
delete module.INIT; delete module.INIT;
@@ -125,7 +125,7 @@ window.addEventListener("load", function () {
window.addEventListener("unload", function () { window.addEventListener("unload", function () {
for (let [, mod] in iter(modules)) for (let [, mod] in iter(modules))
if (mod instanceof ModuleBase && 'destroy' in mod) if (mod instanceof ModuleBase && "destroy" in mod)
mod.destroy(); mod.destroy();
}, false); }, false);