import { Injector } from '@angular/core' ; class ThyStoreModuleIsNotImported extends Error { constructor ( ) { super ( `You've forgotten to import "ThyStoreModule"!` ) ; } } let injector = null ; function assertDefined < T > ( actual ) { if ( actual == null ) { throw new ThyStoreModuleIsNotImported ( ) ; } } export function setInjector ( parentInjector ) { injector = parentInjector ; } /**
 * Ensure that we don't keep any references in case of the bootstrapped
 * module is destroyed via `NgModuleRef.destroy()`.
 */ export function clearInjector ( ) { injector = null ; } export function getInjector ( ) { assertDefined ( injector ) ; return injector ; }