jsdoc typedef global to local, why not overridden?

Viewed 112

Props with global type declaration
I want to overwrite it with the local type.

Below is the code and comments.

/* global */

/**
 * @typedef {{key: string, value: string}} Props
 */

/**
 * @type {Props}
 */
let globalTypeObj = {};


/* local */
class LocalType {
    /**
     * @typedef {{name: string, age: number}} Props
     * @param {Props} props
     */
    constructor(props) {} // <- Why doesn't LocalType Props apply here?
}


/**
 * @namespace {LocalType} // I used namespace LocalType.
 * @type {Props}
 */
let LocalTypeObj = {};  // <- Why doesn't LocalType Props apply here?

Please teach me.

0 Answers
Related