Skip to content

no-undefined-types: false positive for @template with @typedef #579

Closed
@kevinoid

Description

@kevinoid

Expected behavior

The code below would not produce any warnings.

Actual behavior

/tmp/example.js
  5:0  warning  The type 'ValueType' is undefined  jsdoc/no-undefined-types
  5:0  warning  The type 'ValueType' is undefined  jsdoc/no-undefined-types

✖ 2 problems (0 errors, 2 warnings)

ESLint Config

{
  "extends": [
    "plugin:jsdoc/recommended"
  ],
  "settings": {
    "jsdoc": {
      "mode": "typescript"
    }
  }
}

ESLint sample

/**
 * A function returning the same type as its argument.
 *
 * @template ValueType
 * @typedef {function(ValueType): ValueType} ValueFunc
 */

Environment

  • Node version: v14.0.0
  • ESLint version v7.2.0
  • eslint-plugin-jsdoc version: 27.0.7

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions