Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Support optional argument types #19

Open
jgiles opened this issue Jul 26, 2014 · 0 comments
Open

Support optional argument types #19

jgiles opened this issue Jul 26, 2014 · 0 comments

Comments

@jgiles
Copy link
Contributor

jgiles commented Jul 26, 2014

Example:

/** @param {ParamType=} opt_param */
var fnOptParam = function(opt_param) {
  opt_param; //: ParamType=
};
fnOptParam; //: fn(opt_param: ParamType=)

Note: This is separate from nullability information.
The Tern doc_comment plugin modifies the displayed parameter names in order to surface this information. Ideally, it would be part of the type information attached to the parameter.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant