I\'ve searched around but can\'t seem to find an answer for this, hopefully you can help. How can I add an enum to Image? This is what I would like ideally but I get an error.>
I think I may have found a solution...whether it's valid TypeScript I don't know but it works and doesn't cause any compile errors. It's a combination of the above answers.
declare module 'Lib' {
module Graphics {
module Image {
enum State { }
var STATE_IDLE: State;
var STATE_LOADING: State;
var STATE_READY: State;
var STATE_ERROR: State;
}
class Image {
constructor();
}
}
}
Can anyone spot any potential issues with this that I haven't noticed?