TS1183
An implementation cannot be declared in ambient contexts.
Broken Code ❌
export function logSomething(error: unknown): void {
console.log('something');
}Fixed Code ✔️
You cannot write a function implementation inside a declaration file (*.d.ts). You can only declare its signature:
export function logSomething(error: unknown): void;Alternatively, you can write your function implementation inside a source code file (*.ts).
