Tabnine Logo For Javascript
Tag
Code IndexAdd Tabnine 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

  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • ms
    Tiny millisecond conversion utility
  • chalk
    Terminal string styling done right
  • glob
    a little globber
  • webpack
    Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  • http
  • mime-types
    The ultimate javascript content-type utility.
  • minimatch
    a glob matcher in javascript
  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now