Skip to content

[JSDoc] Missing support of JSdoc @type #16199

@yuit

Description

@yuit
  • {Object} has type any, it should be {}
// @ts-check
/**
 * @type {Object}
 */
var bar;
// @ts-check
/**
 * @type {Object.<string, number>} obj
 */
var bar;
  • Specify property in object type
// @ts-check
/**
 * @type {Object} myObj
 * @type {number} myObj.a
 */
var bar;
  • Using with @callback
// @ts-check
/**
 * @callback myCallback
 * @param {number} x - ...
 */

/** @type {myCallback} */
var cb;

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions