Recently, I delved into learning Typescript and have found it to be quite a challenge, especially when dealing with modules.
While attempting to import typings using npm install -s @types/knockout
, I noticed that most of the available typings are still written in Typescript 1.
Take for instance this typing definition from the es6-promise package:
declare module 'es6-promise' {
var foo: typeof Promise; // Temporary variable for referencing Promise locally
namespace rsvp {
export var Promise: typeof foo;
export function polyfill(): void;
}
export = rsvp;
}
I wonder if there is a method to import the default export specified as export = xxx
from Typescript 2?