TS1039

Initializers are not allowed in ambient contexts.

Broken Code ❌

index.d.ts
declare module hexo {
  var config = {};
}

Fixed Code ✔️

Within a declaration file (ambient context), you should define types instead of implementing code. Consequently, you'll need to replace the initialization with a type annotation:

index.d.ts
declare module hexo {
  var config: {};
}