Referencing a module in the same file as it's declaration
I have the following issue:
The TypeScript declarations for the Pixi library exist but seem to be
broken. Firstly, they start with
declare module PIXI
instead of
declare module "PIXI"
I'm not sure if this is wrong but all the other delcarations (for node,
socket.io, etc.) seem to use strings for names. When I change it to a
string it works but encounters an error later. Outside of that PIXI module
there this:
declare function requestAnimFrame( animate: PIXI.IBasicCallback );
Now because I changed PIXI to a string (I assume), it says that the
variable PIXI doesn't contain a type named IBasicCallback. The module does
export that type, but it's just not available outside of it. Outside of
the declaration file, in my code, I can use PIXI.IBasicCallback just fine,
but inside the same file it's not recognized.
What can I do to fix this?
No comments:
Post a Comment