documentation/test/fixture/html/nested.input.js
2015-12-07 12:44:15 -05:00

118 lines
2.3 KiB
JavaScript

'use strict';
/**
* Creates a new Klass
* @class
*/
function Klass(foo) {
this.foo = foo;
}
/**
* Get this Klass's foo
* @returns {Number} foo
* @example
* foo.getFoo();
*/
Klass.prototype.getFoo = function () {
return this.foo;
};
/**
* A function with an options parameter
* @param {Object} options
* @param {string} options.foo
* @param {number} options.bar
* @param {?number} otherOptions
*/
Klass.prototype.withOptions = function (options, otherOptions) {
};
/**
* Decide whether an object is a Klass instance
* This is a [klasssic]{@link Klass}
* This is a [link to something that does not exist]{@link DoesNot}
*
* @param {Object} other
* @param {*} also
* @returns {boolean} whether the other thing is a Klass
*/
Klass.isClass = function (other, also) {
return other instanceof Klass;
};
/**
* A function that triggers the case where the autolinker doesn't find
* the referenced class type
*
* @param {Weird} other
* @returns {boolean} whether the other thing is a Klass
*/
Klass.isWeird = function (other) {
return other instanceof Weird;
};
/**
* This method takes a Buffer object that will be linked to nodejs.org
*
* @param {Buffer|string} buf
* @param {number} [size=0] size
* @returns {boolean} whether the other thing is a Klass
*/
Klass.isBuffer = function (buf, size) {
return other instanceof Buffer;
};
/**
* This method takes an array of buffers and counts them
*
* @param {Array<Buffer>} buffers some buffers
* @returns {number} how many
*/
Klass.isArrayOfBuffers = function (buffers) {
return buffers.length;
};
/**
* A magic number that identifies this Klass.
*/
Klass.MAGIC_NUMBER = 42;
/**
* Get an instance of {@link Klass}. Will make
* a {@link Klass klass instance multiword},
* like a {@link Klass|klass}
*
* @returns {Klass} that class
*/
function bar() {
return new Klass(1);
}
/**
* Rest property function
* @returns {undefined} nothing
*/
function bar(...toys: Number) {
return undefined;
}
/**
* Get an instance of {@link Klass}. Will make
* a {@link Klass klass instance multiword},
* like a {@link Klass|klass}. This needs a {@link number} input.
*
* @returns {undefined} nothing
*/
function bar() {
return undefined;
}
/**
* Klass event
* @event event
* @memberof Klass
*/
bar();