| 3 | export type ImageMap = { [s: string]: HTMLImageElement; }; |
| 4 | |
| 5 | export class ImageRepository { |
| 6 | private static repository: ImageMap = {}; |
| 7 | |
| 8 | public static storeImage(id: string, image: HTMLImageElement) { |
| 9 | ImageRepository.repository[id] = image; |
| 10 | } |
| 11 | |
| 12 | public static storeImages(ids: string[], images: HTMLImageElement[]) { |
| 13 | zip(ids, images).forEach((pair: [string, HTMLImageElement]) => { |
| 14 | ImageRepository.storeImage(...pair); |
| 15 | }) |
| 16 | } |
| 17 | |
| 18 | public static getById(uuid: string): HTMLImageElement { |
| 19 | return ImageRepository.repository[uuid]; |
| 20 | } |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected