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.
declare module 'Lib' {
export module Graphics {
export class Image {
enum State {}
static STATE_IDLE: State;
static STATE_LOADING: State;
static STATE_READY: State;
static STATE_ERROR: State;
constructor();
}
}
}
If I move State
into the Graphics
module it works but now State
belongs to Graphics
, which is incorrect. It needs to be part of Image
.