Codota Logo For Javascript
Tag
Code IndexAdd Codota to your IDE (free)

How to use
Tag
in
doctrine

Best JavaScript code snippets using doctrine.Tag(Showing top 1 results out of 315)

origin: nodejs/http2

switch (tag.title.toLowerCase()) {
    if (!tag.type) {
      context.report({ node: jsdocNode, message: "Missing JSDoc parameter type for '{{name}}'.", data: { name: tag.name } });
    if (!tag.description && requireParamDescription) {
      context.report({ node: jsdocNode, message: "Missing JSDoc parameter description for '{{name}}'.", data: { name: tag.name } });
    if (params[tag.name]) {
      context.report({ node: jsdocNode, message: "Duplicate JSDoc parameter '{{name}}'.", data: { name: tag.name } });
    } else if (tag.name.indexOf(".") === -1) {
      params[tag.name] = 1;
    if (!requireReturn && !functionData.returnPresent && (tag.type === null || !isValidReturnType(tag)) && !isAbstract) {
      context.report({
        node: jsdocNode,
        message: "Unexpected @{{title}} tag; function has no return statement.",
        data: {
          title: tag.title
      if (requireReturnType && !tag.type) {
        context.report({ node: jsdocNode, message: "Missing JSDoc return type." });
      if (!isValidReturnType(tag) && !tag.description && requireReturnDescription) {
        context.report({ node: jsdocNode, message: "Missing JSDoc return description." });
if (prefer.hasOwnProperty(tag.title) && tag.title !== prefer[tag.title]) {
  context.report({ node: jsdocNode, message: "Use @{{name}} instead.", data: { name: prefer[tag.title] } });
doctrine(npm)Tag

JSDoc

Represents a single jsdoc tag.
So for example:
  `@ param {{ok:String}} userName`
  (ignore the space after the @)

Would be represented as:

    {title: 'param', name: 'userName',
     type: {type: 'RecordType", fields: [
         {type: 'FieldType',
          key: 'ok',
          value: {type: 'NameExpression', name: 'String'}}]}}

Most used doctrine functions

  • parse
    Parse the given content as a jsdoc comment.
  • Annotation.description
    The overall description of the thing being documented.
  • Tag.description
    The description of the thing this tag is documenting.
  • Tag.name
    The name of the thing this tag is documenting, if any.
  • Tag.title
    The title of the jsdoc tag. e.g. `@foo` will have a title of 'foo'.

Popular in JavaScript

  • async
    Higher-order functions and common patterns for asynchronous code
  • ms
    Tiny millisecond conversion utility
  • through2
    A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • semver
    The semantic version parser used by npm.
  • commander
    the complete solution for node.js command-line programs
  • winston
    A logger for just about everything.
  • moment
    Parse, validate, manipulate, and display dates
  • express
    Fast, unopinionated, minimalist web framework
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now