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.>
You could create a module and class with the same name. It might also help to rename your enum so that you don't have to say State twice:
declare module 'Lib' {
export module Graphics {
export class Image {
constructor();
}
export module Image {
export enum State {
Idle,
Loading,
Ready,
Error
}
}
}
}