Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98575

how jsdoc Classes with static properties

$
0
0

how i can get a valid setup here? enter image description here

I want able to doc the id property with the static classes _Test.list but am not able to found the correct way with intellisense inside vscode. So all number not come from _Test.list dictionary, should give me error. enter image description here

Any body can help me to format correctly this with jsdoc plz. Sorry if is a noob questions, am starting with jsdoc.

class _Test {
    static list = { a:1,b:2,c:3 };
    constructor() {
        /**
        * @typedef {Object} DATA
        * @property {_Test.list} DATA.id - id from list _Test.list
        * @property {_Test.list} DATA.id2 - id from list _Test.list
        * 
        */
        /**@type {DATA} */
        this.list = {
            id: _Test.list.a, // should ok
            id2: 14, // should show a error
        }
    }
};

I want proceed like that's because i need keep references features inside vscode. enter image description here


Viewing all articles
Browse latest Browse all 98575

Trending Articles