type ObjectString = { [ key ] : string ; } ; export class ImageManager { private static map : ObjectString = { } ; private static overrideMap : { [ key ] : boolean ; } = { } ; public static add ( imgMap ) { Object . keys ( imgMap ) . forEach ( name => { if ( this . map [ name ] ) { this . overrideMap [ name ] = true ; } this . map [ name ] = imgMap [ name ] ; } ) ; } public static get < T extends ObjectString > ( name ) { return ( this . map as any ) [ name ] ; } public static getOverrideMap ( ) { return this . overrideMap ; } }