import { Stats } from '../../../types/Stats' ; export default class ModuleIdToNameMap { private map : Map < string | number , string > ; constructor ( stats ) { this . map = new Map ( ) ; for ( let module of stats . modules ) { let name = module . modules ? module . modules [ 0 ] . name : module . name ; this . map . set ( module . id , name ) ; } } get ( id ) { return this . map . get ( id ) ; } }