TYPE-EXPRESSION

  • typedef
documentjs.typeExpression

{String}

 

String

Represents a Google Closure type expression. These produce typeData. They are used by [documentjs.tags.params], @return, @option and @module to specify the shape of some data.

The various supported types are documented here.

Examples:

  • Type Name - {Boolean} {Window} {goog.ui.Menu}
  • The ALL type - {*}
  • The UNKNOWN type - {?}
  • Type Application - {Array.<String>} {Object<String, Number>}
  • Type Union - {Number-Boolean}
  • Record Type - {{myNum: number, myObject}}
  • Nullable type - {?number}
  • Non-nullable type - {!Object}
  • Variable parameters - {...number}
  • Optional parameter - {number=}
  • Function Type - {function(string, boolean)}
  • Function Return Type - {function(): number}
  • Function this Type - {function(this:Menu, string)}
  • Function new Type - {function(new:Menu, string)}
  • Variable parameters - {function(string, ...[number])}