diff --git a/src/core/di/provider_util.ts b/src/core/di/provider_util.ts index e6e0b7c..f471124 100644 --- a/src/core/di/provider_util.ts +++ b/src/core/di/provider_util.ts @@ -41,16 +41,16 @@ function _hasTemplate( annotation: any ): boolean { return isPresent( annotation.template || annotation.templateUrl ); } -export function isService(annotation: any): annotation is InjectableMetadata { +export function isService( annotation: any ): annotation is InjectableMetadata { return annotation instanceof InjectableMetadata; } -export function isPipe(annotation: any): annotation is PipeMetadata { - return isString(annotation.name) && annotation instanceof PipeMetadata; +export function isPipe( annotation: any ): annotation is PipeMetadata { + return isString( annotation.name ) && annotation instanceof PipeMetadata; } export function isInjectMetadata( injectMeta: any ): injectMeta is InjectMetadata { return injectMeta instanceof InjectMetadata; } export function isNgModule( annotation: any ): annotation is NgModuleMetadata { - return isPresent( annotation.declarations ) && annotation instanceof NgModuleMetadata + return annotation instanceof NgModuleMetadata } diff --git a/src/core/util/bundler.ts b/src/core/util/bundler.ts index 3045679..016e002 100644 --- a/src/core/util/bundler.ts +++ b/src/core/util/bundler.ts @@ -58,7 +58,7 @@ export function bundle( NgModuleClass: Type, otherProviders: any[] = [], existin const annotations = reflector.annotations( NgModuleClass ); const ngModuleAnnotation: NgModuleMetadata = annotations[ 0 ]; if (!isNgModule(ngModuleAnnotation)) { - throw new Error(`bundle() requires an @NgModule as it's first argument`) + throw new Error(`bundle() requires a decorated NgModule as its first argument`) } const { declarations = [], providers = [], imports = [] }={} = ngModuleAnnotation;