JavaScript

JavaScript

Made by DeepSource

Invalid custom TypeScript modules declaration JS-0364

Anti-pattern
Minor
Autofix

In an effort to prevent further confusion between custom TypeScript modules and the new ES2015 modules, starting with TypeScript v1.5 the keyword namespace is now the preferred way to declare custom TypeScript modules. Use the namespace keyword instead of the module keyword to declare custom TypeScript modules.

Bad Practice

declare namespace Lib {
  //
}

Recommended

declare module Foo {
  //
}