How to use the doctrine.Syntax.OptionalType function in doctrine

To help you get started, we’ve selected a few doctrine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapbox / mapbox-gl-js / docs / _theme / lib / format_parameters.js View on Github external
function formatParameter(param, short) {
  if (short) {
    return param.type.type == Syntax.OptionalType ? '[' + param.name + ']' : param.name;
  } else {
    return param.name + ': ' + formatMarkdown.type(param.type).replace(/\n/g, '');
  }
}
github documentationjs / documentation / default-theme / lib / format_parameters.js View on Github external
function formatParameter(param, short) {
  if (short) {
    return param.type.type == Syntax.OptionalType ? '[' + param.name + ']' : param.name;
  } else {
    return param.name + ': ' + formatMarkdown.type(param.type).replace(/\n/g, '');
  }
}