mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-18 14:17:30 +00:00
* build: Use Flow syntax without comments. We're switching to Flow annotations - not Flow comments. This gives documentation.js the ability to self-document without JSDoc types and improves our compatibility with tools like prettier. Fixes #729. Fixes #709
24 lines
472 B
JavaScript
24 lines
472 B
JavaScript
/**
|
|
* This is my class, a demo thing.
|
|
* @class MyClass
|
|
* @property {number} howMany how many things it contains
|
|
*/
|
|
function MyClass() {
|
|
this.howMany = 2;
|
|
}
|
|
|
|
/**
|
|
* Get the number 42
|
|
* @param {boolean} getIt whether to get the number
|
|
* @returns {number} forty-two
|
|
*/
|
|
MyClass.prototype.getFoo = function(getIt) {
|
|
return getIt ? 42 : 0;
|
|
};
|
|
|
|
/**
|
|
* Get undefined
|
|
* @returns {undefined} does not return anything.
|
|
*/
|
|
MyClass.prototype.getUndefined = function() {};
|