1.

How to declare a module in TypeScript?

Answer»

Here’s how to DECLARE modules in Typescript:

Declaring any of the EXTERNAL modules having no exposed types or values:

declare module 'Foo' {
   var x: any;
   EXPORT = x;
}

For declaring INDIVIDUAL classes

declare module 'Foo' {
   export type cls = any;
   export var cls: any;
}



Discussion

No Comment Found