export class DefaultDict < T > { [ key ] : T ; constructor ( constr ) { return new Proxy ( { } , { get : ( target , name ) => { if ( ! target . hasOwnProperty ( name ) ) { target [ name ] = constr ( ) ; } return target [ name ] ; } , } ) ; } }