Skip to content

Destructured JSDoc Arguments No Longer Collectively Typeable Using Arbitrary Name #1225

Open
@LukeAbby

Description

@LukeAbby

On Strada this snippet works fine:

/**
 * @param {{ foo: number; bar: string }} args
 */
function foo({ foo, bar }) {}

Resulting in this .d.ts file:

/**
 * @param {{ foo: number; bar: string }} args
 */
declare function foo({ foo, bar }: {
    foo: number;
    bar: string;
}): void;

However in Corsa it appears that this has no effect and foo and bar are typed as any.

CC @sandersn. Was this something intentionally left out of the JSDoc port or just something not yet implemented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Declaration EmitRelated to declaration emit, type printingDomain: JSRelated to JS parsing, checking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions