import { DataUtility } from '../utility' ; import { IDIContainer } from '../interfaces' ; export class DIContainer implements IDIContainer { constructor ( private injector , private cb ) { } resolve < T > ( type ) { return ( ! DataUtility . isUndefinedOrNull ( this . cb ) ) ? this . cb ( this . injector , type ) : new type ( ) ; } static create ( injector , cb ) { return new DIContainer ( injector , cb ) ; } }