'Implement interface' quick fix generates bodies in ambient contexts · Issue #19703 · microsoft/TypeScript (original) (raw)

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

}