-
In my TypeScript file, I would like to declare a variable with a type of JZZ.Port.Async as defined in JZZ.d.ts. If I do
the TypeScript compiler complains that it cannot find namespace "JZZ". If I instead do
I get a similar error about the jzz namespace not being found. The problem, I think, is that the last line in the JZZ.d.ts file, export = jzz, makes all the other declarations in that file local and not global. If I edit the JZZ.d.ts file to explicitly add an export of the JZZ namespace, like this:
then the following TypeScript code compiles without error
My question is if there is any way I can access the JZZ namespace without having to edit the JZZ.d.ts file? If not, would you consider adding an export of this namespace? I'd be happy to create a pull request for it :-). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
JZZ.d.ts is a bit outdated. |
Beta Was this translation helpful? Give feedback.
JZZ.d.ts is a bit outdated.
I'd suggest to use JZZ as plain JavaScript, declare
let output: any
, and ignore the TS complains.