Skip to content
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

Getter/Setter declaration emit for javascript is missing #33643

Closed
weswigham opened this issue Sep 27, 2019 · 0 comments · Fixed by #33649
Closed

Getter/Setter declaration emit for javascript is missing #33643

weswigham opened this issue Sep 27, 2019 · 0 comments · Fixed by #33649
Assignees
Labels
Bug A bug in TypeScript

Comments

@weswigham
Copy link
Member

weswigham commented Sep 27, 2019

The PR adding getter/setter declaration emit, and the PR adding the JS declaration emitter (both merged this week), did not really interact. So the JS declaration emitter is currently missing emit for getter/setter pairs. This in JS:

class Q {
    get x() {
        return 12;
    }
}

currently emits this declaration file:

declare class Q {
    readonly x: number;
}

when it should be

declare class Q {
    get x(): number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant