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

'Implement interface' quick fix generates bodies in ambient contexts #19703

Closed
DanielRosenwasser opened this issue Nov 3, 2017 · 0 comments · Fixed by #32787
Closed

'Implement interface' quick fix generates bodies in ambient contexts #19703

DanielRosenwasser opened this issue Nov 3, 2017 · 0 comments · Fixed by #32787
Assignees
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions.

Comments

@DanielRosenwasser
Copy link
Member

interface Hook {
    tap(): void
}

declare class SyncHook implements Hook {
    
}

Try using the "Implement interface" quick fix on SyncHook.

Expected:

declare class SyncHook implements Hook {
    tap(): void;
}

Actual:

declare class SyncHook implements Hook {
    tap(): void {
        throw new Error("Method not implemented.");
    }

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants