The subset of JSDoc supported by Google Closure Compiler.
|
@constructor
|
Function is a constructor (can new)
|
|
@deprecated
|
Function is deprecated
|
|
@extends {Type}
|
Function inherits Type
|
|
@implements {Type}
|
Function implements Type (with @constructor)
|
|
@inheritDoc
|
Function has same JSDoc as superclass
|
|
@interface
|
Function is interface (no new)
|
|
@nosideeffects
|
Can be removed if return value not used
|
|
@override
|
Function overrides superclass
|
|
@param {Type} varname Description
|
Function takes varname of Type
|
|
@private
|
Function is private (same file or static/instance members)
|
|
@protected
|
Function is protected (same file or static/instance of subclasses)
|
|
@return {Type} Description
|
Function returns Type
|
|
@this {Type}
|
In Function, this is Type
|
|
@const
|
Property is constant
|
|
@define
|
Property can be overridden by compiler
|
|
@deprecated
|
Property is deprecated
|
|
@enum {Type}
|
Property is an enum of Type (default number)
|
|
@expose
|
Property not optimized by compiler
|
|
@lends {objectName}
|
Keys of object are same as property of other object (see: http://code.google.com/p/jsdoc-toolkit/wiki/TagLends)
|
|
@private
|
Property is private
|
|
@protected
|
Property is protected
|
|
@type {Type}
|
Property is {Type}
|
|
{boolean}
|
True
|
|
{number}
|
1
|
|
{string}
|
'monkey'
|
|
{Object}
|
{}
|
|
{Array}
|
[]
|
|
{Window}
|
defined type Window
|
|
{goog.ui.Menu}
|
defined type goog.ui.Menu
|
|
{Array.<string>}
|
['a','b','c']
|
|
{Object.<string, number>}
|
{'a':1, 'b':2}
|
|
{(number|boolean)}
|
1 or True
|
|
{{myNum: number, myObject}}
|
Record with property myNum {number} and myObject {Object}
|
|
{Array.<{length}>}
|
Array of {Objects} with property length
|
|
{?number}
|
{number} or null
|
|
{!Object}
|
{Object} but never null
|
|
{function(string, boolean)}
|
Function with params and unknown return value
|
|
{function(): number}
|
Function returning number
|
|
{function(this:goog.ui.Menu, string)}
|
Function where this is goog.ui.Menu
|
|
{function(new:goog.ui.Menu, string)}
|
Function takes string, creates new goog.ui.Menu
|
|
{function(string, ...[number])}
|
Function takes string then optional number s
|
|
@param {...number} var_args
|
Variable number of parameters of type number
|
|
@param {number=} opt_argument
|
Optional parameter of type number
|
|
{function(?string=, number=)}
|
Function with optional parameters
|
|
{*}
|
Variable can take any type
|
|
{?}
|
Variable can take any type and don't type check
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.