multiplex.js icon indicating copy to clipboard operation
multiplex.js copied to clipboard

'.../multiplex.d.ts' is not a module

Open patroza opened this issue 8 years ago • 2 comments

Typescript 2.4. '.../multiplex.d.ts' is not a module

while using the import syntax: import * as mx from "multiplexjs";

Not sure about the exact resolution, I guess the definition should be different depending on global browser, or ES6 module usage.

My workround is to use:

import "multiplexjs"; // makes the mx type definition usable
const mx: mx.MultiplexStatic = require("multiplexjs"); // makes the mx static function available

patroza avatar Jun 25 '17 07:06 patroza

Any update for this issue?

sk29110 avatar Sep 15 '17 15:09 sk29110

I cannot use it either in an angular 4 project. the quoted workaround don't work for me.

junalmeida avatar Apr 24 '18 14:04 junalmeida