Skip to content

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

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
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.");
    }

}

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions