Skip to content

Broken d.ts generation for destructuring #4250

Closed
@Kinchkun

Description

@Kinchkun

Hello,

we moved recently from TS 1.4 to TS 1.5 with Visual Studio 2013.

When we have the following class definition:

export class ErrorClass {
    public foo({bar: number}) { }
}

With the Option "Generate declaration files" and "combine javascript output into file" to true, the resulting declaration for this file will be:

class ErrorClass {
    foo({bar: }: {
        bar: any;
    }): void;
}

Which is syntactically incorrect: The first "bar" is missing the type specifier (and is of type number instead of any).

This will cause that projects using this declaration file fails to compile.

Can anyone reproduce this? Is there a fix available?

Kind regards,
Timo

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions