class ResourcesMap extends Map < string , any > { set ( key , value ) { if ( typeof key !== 'string' ) throw 'invalid resource name!' ; key = key . toLowerCase ( ) ; return super . set ( key , value ) ; } get < V = any > ( key ) { return super . get ( key . toLowerCase ( ) ) as V ; } has ( key ) { return super . has ( key . toLowerCase ( ) ) ; } delete ( key ) { return super . delete ( key . toLowerCase ( ) ) ; } } const PluginResourcesMap = new ResourcesMap ( ) ; export const buildResouceKey = ( { type , name , resource } ) => [ type , name , resource ] . join ( '/' ) ; export default PluginResourcesMap ;