Skip to content

Broken d.ts generation for destructuring #4250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Kinchkun opened this issue Aug 10, 2015 · 2 comments
Closed

Broken d.ts generation for destructuring #4250

Kinchkun opened this issue Aug 10, 2015 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@Kinchkun
Copy link

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

@mhegazy
Copy link
Contributor

mhegazy commented Aug 10, 2015

duplicate of #3912

@mhegazy mhegazy closed this as completed Aug 10, 2015
@mhegazy mhegazy added the Duplicate An existing issue was already created label Aug 10, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Aug 10, 2015

Fix is in master now. please give it a try on the nightly build later tonight/tomorrow using npm install typescript@next

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants