import { Injectable } from '@angular/core' ; import Handsontable from 'handsontable' ; const instances = new Map < string , Handsontable > ( ) ; @ Injectable ( ) export class HotTableRegisterer { public getInstance ( id ) { return instances . get ( id ) ; } public registerInstance ( id , instance ) { return instances . set ( id , instance ) ; } public removeInstance ( id ) { return instances . delete ( id ) ; } }