1

Using TS 2.3.2 the types format has changed so installing types requires non-global typings or NPM @types for global types.

This is all well and good except when global types are required and there are no NPM @types definitions - the error produced on compilation is:

Error TS2503: Cannot find namespace '[MODULE-NAMESPACE]'

In my case the module is RefluxCore which doesn't have any NPM @types definitions.

For context the solution depends on an internally developed NPM package (which is the source of the above error) - this package depends on RefluxCore. Within the current solution of course I can just import RefluxCore - no problem - but the external package will need them to be provide globally.

How can I provide types globally when there are no @types definitions available?

Just to reiterate the latest version of Typescript has a different approach to types which prevent external modules being installed globally by Typings.

Kallum Tanton
  • 802
  • 7
  • 22

0 Answers0