import { Injectable } from '@angular/core' ; import type { NzSafeAny } from 'ng-zorro-antd/core/types' ; @ Injectable ( { providedIn : 'root' } ) export class STWidgetRegistry { private _widgets : { [ type ] : NzSafeAny ; } = { } ; get widgets ( ) : NzSafeAny { return this . _widgets ; } register ( type , widget ) { this . _widgets [ type ] = widget ; } has ( type ) { return this . _widgets . hasOwnProperty ( type ) ; } get ( type ) { return this . _widgets [ type ] ; } }