admin管理员组

文章数量:1355056

I had this JSDoc

    * @param {object} object
    * @param {object} object.a - comment a
    * @param {string} object.a.b - comment b
    * @param {number} object.a.c - comment c
    * @param {string} object.d - comment d

if my data like this

{
  a: {
    1: {
      b: 'text',
      c: 0
    },
    2: {
      b: 'text2',
      c: 1
    }
  },
  d: '2024-12-12'
}

What I want is to, when I hover my cursor on b and c it should display comment like a and d does.

Also 1, 2 is a dynamic key like index so if I want to add more data I write like 3, 4, 5.

本文标签: jsdocHow to write dynamic key in nested objectStack Overflow