-
Notifications
You must be signed in to change notification settings - Fork 2
Tags
doco understands a variety of tags but some of them are used in a cleaner manner than in other documentation engines.
-
NAME means that this parameter takes a name as an argument, which is a variable name including
.
s. -
TYPEDEF means that this parameter takes a type definition as an argument. Type definitions are always enclosed in
{
and}
. - DESCRIPTION means that this parameter takes a description as an argument, which is arbitrary multi-line text.
- [...] means that an argument is optional and may be omitted.
- | means that multiple arguments are possible.
Overrides the primary / exported name of an element.
/**
* @name doco.Builder
*/
var Builder = ...; // With `Builder` being an alias
Marks a function as being the constructor of a class, implicitly making the declaration a class.
/**
* Class description.
* @constructor Constructor description
*/
function MyClass() { ... }
Annotates a function or method parameter, implicitly making the declaration a function or method.
/**
* Function description.
* @param {string} text Text to log
*/
function log(text) { ... }
Annotates a variable as having a specific type.
/**
* Variable description.
* @type {?string}
*/
var name = null;
Annotates a variable as having a specific constant type. May be used in conjunction with @type for compatibility.
/**
* Constant description.
* @const {string}
*/
var doco.VERSION = "1.0.0";
Annotates that a class extends another one, implicitly making the declaration a class.
/**
* Class description.
* @constructor Constructor description
* @extends String
*/
function MyString() { ... }
Annotates that a class mixes in the properties and methods of another class or object.
/**
* Class description.
* @constructor
* @extends ExtendedClass
* @mixin MixedInClass
*/
var MyClass = function() { ... }
Annotates that a class is abstract (meant to be extended), implicitly making the declaration a class.
/**
* Class description.
* @constructor Constructor description
* @abstract
*/
function Base() { ... }
Annotates that a variable or function is an inner construct that usually isn't accessible from the outside. Inner variables and functions are usually not contained in the documentation but may still be used internally to resolve relations.
/**
* Constrant description.
* @const {!RegExp}
* @inner
*/
var expr = /(\w+)/;
/**
* @alias expr
*/
doco.Builder.expr = expr; // No more being inner
Annotates the intended access level of a declaration.
/**
* @param {*} obj
* @private
*/
doco._printDebug = function(obj) { ... }
Annotates that this declaration is an alias of a previously made one, transferred into the current scope.
/**
* @alias doco.Builder
* @inner
*/
var Builder = doco.Builder;
Annotates that this object emits an event.
/**
* @emits ready As soon as the document is ready
* @emits loaded As soon as the document and all its elements have been fully loaded
*/
var Document = ...;
tbc