Skip to content

Parameter property extensions #726

@tmcw

Description

@tmcw

Documenting the elements of a destructured array argument

/** destructuring array */
function destructure([a: number, b: string]) {
}

Should result in something like

- $0[0] (number)
- $0[1] (string)

I think. It does not appear that JSDoc supports this style.

Questions:

  • What to do about the names of the destructured results, like a and b here? When we're dealing with object destructuring, the names are ones that you provide, but here they aren't sensical, since arrays only have indexes. My first guess is to simply discard them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions