The async
keyword only impacts implementation code and therefore isn't valid
in an ambient/declaration context. Therefore the following is an error:
declare module "some-npm-module" {
export async function test(): Promise<void>;
// ^^^^^ Error
}
Fix: Remove async keyword.
Remove the async keyword:
declare module "some-npm-module" {
export function test(): Promise<void>;
}