From c9b71fb5e263db33ad4577aaa79c6342b6868d71 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Fri, 27 May 2016 12:40:31 -0700 Subject: [PATCH] test: add lots of missing stuff to the public_api_spec - many entry points were previously missing (e.g. all testing entry points, http, etc) - upgrade ts-api-guardian to 0.0.3 that adds support for more api surface - add all info to the spec that was surfaced by ts-api-guardian@0.0.3 --- npm-shrinkwrap.clean.json | 2 +- npm-shrinkwrap.json | 6 +- package.json | 2 +- tools/public_api_guard/public_api_spec.ts | 1057 ++++++++++++++++----- 4 files changed, 803 insertions(+), 264 deletions(-) diff --git a/npm-shrinkwrap.clean.json b/npm-shrinkwrap.clean.json index b9d6d09e8d..ac4b9e4f1e 100644 --- a/npm-shrinkwrap.clean.json +++ b/npm-shrinkwrap.clean.json @@ -5179,7 +5179,7 @@ "version": "1.0.0" }, "ts-api-guardian": { - "version": "0.0.2", + "version": "0.0.3", "dependencies": { "typescript": { "version": "1.7.3" diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index bdce2dc15b..1c5f9fcc1d 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -8257,9 +8257,9 @@ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz" }, "ts-api-guardian": { - "version": "0.0.2", - "from": "ts-api-guardian@0.0.2", - "resolved": "https://registry.npmjs.org/ts-api-guardian/-/ts-api-guardian-0.0.2.tgz", + "version": "0.0.3", + "from": "ts-api-guardian@0.0.3", + "resolved": "https://registry.npmjs.org/ts-api-guardian/-/ts-api-guardian-0.0.3.tgz", "dependencies": { "typescript": { "version": "1.7.3", diff --git a/package.json b/package.json index 30f7cefcdd..5cc0289ed4 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "systemjs": "0.18.10", "systemjs-builder": "^0.10.3", "through2": "^0.6.5", - "ts-api-guardian": "0.0.2", + "ts-api-guardian": "0.0.3", "ts2dart": "^0.9.10", "tsickle": "^0.1.2", "tslint": "^3.10.0-dev.2", diff --git a/tools/public_api_guard/public_api_spec.ts b/tools/public_api_guard/public_api_spec.ts index fb19156e23..4bc3b9b92a 100644 --- a/tools/public_api_guard/public_api_spec.ts +++ b/tools/public_api_guard/public_api_spec.ts @@ -6,15 +6,15 @@ import {publicApi} from 'ts-api-guardian'; // ================================================================================================= // ================================================================================================= // -// DO NOT EDIT THIS LIST OF PUBLIC APIS UNLESS YOU GET IT CLEARED BY: mhevery, vsavkin, or tbosch! +// DO NOT EDIT THIS FILE UNLESS YOU GET IT CLEARED BY: mhevery, vsavkin, tbosch or iminar!! // // ================================================================================================= // ================================================================================================= const CORE = [ 'AbstractProviderError', 'AbstractProviderError.addKey(injector:ReflectiveInjector, key:ReflectiveKey):void', - 'AbstractProviderError.constructor(injector:ReflectiveInjector, key:ReflectiveKey, constructResolvingMessage:Function)', 'AbstractProviderError.constructResolvingMessage:Function', + 'AbstractProviderError.constructor(injector:ReflectiveInjector, key:ReflectiveKey, constructResolvingMessage:Function)', 'AbstractProviderError.context:any', 'AbstractProviderError.injectors:ReflectiveInjector[]', 'AbstractProviderError.keys:ReflectiveKey[]', @@ -27,44 +27,20 @@ const CORE = [ 'AfterViewChecked.ngAfterViewChecked():any', 'AfterViewInit', 'AfterViewInit.ngAfterViewInit():any', - 'ApplicationRef', - 'ApplicationRef.bootstrap(componentFactory:ComponentFactory):ComponentRef', - 'ApplicationRef.componentTypes:Type[]', - 'ApplicationRef.dispose():void', - 'ApplicationRef.injector:Injector', - 'ApplicationRef.registerBootstrapListener(listener:(ref: ComponentRef) => void):void', - 'ApplicationRef.registerDisposeListener(dispose:() => void):void', - 'ApplicationRef.run(callback:Function):any', - 'ApplicationRef.tick():void', - 'ApplicationRef.waitForAsyncInitializers():Promise', - 'ApplicationRef.zone:NgZone', - 'asNativeElements(debugEls:DebugElement[]):any', - 'assertPlatform(requiredToken:any):PlatformRef', - 'AttributeMetadata', - 'AttributeMetadata.constructor(attributeName:string)', - 'AttributeMetadata.token:AttributeMetadata', - 'AttributeMetadata.toString():string', - 'AttributeMetadataFactory', - 'BaseException', - 'BaseException.constructor(message:string)', - 'BaseException.stack:any', - 'BaseException.toString():string', - 'bind(token:any):ProviderBuilder', - 'Binding', - 'Binding.constructor(token:any, {toClass,toValue,toAlias,toFactory,deps,multi}:{toClass?:Type, toValue?:any, toAlias?:any, toFactory:Function, deps?:Object[], multi?:boolean})', - 'Binding.toAlias:any', - 'Binding.toClass:any', - 'Binding.toFactory:any', - 'Binding.toValue:any', 'AnimationAnimateMetadata', 'AnimationAnimateMetadata.constructor(timings:string|number, styles:AnimationStyleMetadata|AnimationKeyframesSequenceMetadata)', + 'AnimationAnimateMetadata.styles:AnimationStyleMetadata|AnimationKeyframesSequenceMetadata', + 'AnimationAnimateMetadata.timings:string|number', 'AnimationEntryMetadata', 'AnimationEntryMetadata.constructor(name:string, definitions:AnimationStateMetadata[])', + 'AnimationEntryMetadata.definitions:AnimationStateMetadata[]', + 'AnimationEntryMetadata.name:string', 'AnimationGroupMetadata', 'AnimationGroupMetadata.constructor(_steps:AnimationMetadata[])', 'AnimationGroupMetadata.steps:AnimationMetadata[]', 'AnimationKeyframesSequenceMetadata', 'AnimationKeyframesSequenceMetadata.constructor(steps:AnimationStyleMetadata[])', + 'AnimationKeyframesSequenceMetadata.steps:AnimationStyleMetadata[]', 'AnimationMetadata', 'AnimationPlayer', 'AnimationPlayer.destroy():void', @@ -83,18 +59,52 @@ const CORE = [ 'AnimationSequenceMetadata.steps:AnimationMetadata[]', 'AnimationStateDeclarationMetadata', 'AnimationStateDeclarationMetadata.constructor(stateNameExpr:string, styles:AnimationStyleMetadata)', + 'AnimationStateDeclarationMetadata.stateNameExpr:string', + 'AnimationStateDeclarationMetadata.styles:AnimationStyleMetadata', 'AnimationStateMetadata', 'AnimationStateTransitionMetadata', + 'AnimationStateTransitionMetadata.animation:AnimationMetadata', 'AnimationStateTransitionMetadata.constructor(stateChangeExpr:string, animation:AnimationMetadata)', + 'AnimationStateTransitionMetadata.stateChangeExpr:string', 'AnimationStyleMetadata', - 'AnimationStyleMetadata.constructor(styles:Array, offset:number)', + 'AnimationStyleMetadata.constructor(styles:Array, offset:number=null)', + 'AnimationStyleMetadata.offset:number=null', + 'AnimationStyleMetadata.styles:Array', 'AnimationWithStepsMetadata', 'AnimationWithStepsMetadata.constructor()', 'AnimationWithStepsMetadata.steps:AnimationMetadata[]', + 'ApplicationRef', + 'ApplicationRef.bootstrap(componentFactory:ComponentFactory):ComponentRef', + 'ApplicationRef.componentTypes:Type[]', + 'ApplicationRef.dispose():void', + 'ApplicationRef.injector:Injector', + 'ApplicationRef.registerBootstrapListener(listener:(ref: ComponentRef) => void):void', + 'ApplicationRef.registerDisposeListener(dispose:() => void):void', + 'ApplicationRef.run(callback:Function):any', + 'ApplicationRef.tick():void', + 'ApplicationRef.waitForAsyncInitializers():Promise', + 'ApplicationRef.zone:NgZone', + 'AttributeMetadata', + 'AttributeMetadata.attributeName:string', + 'AttributeMetadata.constructor(attributeName:string)', + 'AttributeMetadata.toString():string', + 'AttributeMetadata.token:AttributeMetadata', + 'AttributeMetadataFactory', + 'BaseException', + 'BaseException.constructor(message:string="--")', + 'BaseException.message:string="--"', + 'BaseException.stack:any', + 'BaseException.toString():string', + 'Binding', + 'Binding.constructor(token:any, {toClass,toValue,toAlias,toFactory,deps,multi}:{toClass?:Type, toValue?:any, toAlias?:any, toFactory:Function, deps?:Object[], multi?:boolean})', + 'Binding.toAlias:any', + 'Binding.toClass:any', + 'Binding.toFactory:any', + 'Binding.toValue:any', 'ChangeDetectionStrategy', 'ChangeDetectionStrategy.CheckAlways', - 'ChangeDetectionStrategy.Checked', 'ChangeDetectionStrategy.CheckOnce', + 'ChangeDetectionStrategy.Checked', 'ChangeDetectionStrategy.Default', 'ChangeDetectionStrategy.Detached', 'ChangeDetectionStrategy.OnPush', @@ -111,24 +121,27 @@ const CORE = [ 'CollectionChangeRecord', 'CollectionChangeRecord.constructor(item:any, trackById:any)', 'CollectionChangeRecord.currentIndex:number', + 'CollectionChangeRecord.item:any', 'CollectionChangeRecord.previousIndex:number', 'CollectionChangeRecord.toString():string', + 'CollectionChangeRecord.trackById:any', 'ComponentDecorator', 'ComponentDecorator.View(obj:{templateUrl?:string, template?:string, directives?:Array, pipes?:Array, renderer?:string, styles?:string[], styleUrls?:string[], animations?:AnimationEntryMetadata[]}):ViewDecorator', 'ComponentFactory.componentType:Type', 'ComponentFactory.constructor(selector:string, _viewFactory:Function, _componentType:Type)', - 'ComponentFactory.create(injector:Injector, projectableNodes:any[][], rootSelectorOrNode:string|any):ComponentRef', + 'ComponentFactory.create(injector:Injector, projectableNodes:any[][]=null, rootSelectorOrNode:string|any=null):ComponentRef', + 'ComponentFactory.selector:string', 'ComponentFactory', 'ComponentMetadata', 'ComponentMetadata.animations:AnimationEntryMetadata[]', 'ComponentMetadata.changeDetection:ChangeDetectionStrategy', - 'ComponentMetadata.constructor({selector,inputs,outputs,properties,events,host,exportAs,moduleId,providers,viewProviders,changeDetection=ChangeDetectionStrategy.Default,queries,templateUrl,template,styleUrls,styles,animations,directives,pipes,encapsulation}:{selector?:string, inputs?:string[], outputs?:string[], properties?:string[], events?:string[], host?:{[key:string]:string}, providers?:any[], exportAs?:string, moduleId?:string, viewProviders?:any[], queries?:{[key:string]:any}, changeDetection?:ChangeDetectionStrategy, templateUrl?:string, template?:string, styleUrls?:string[], styles?:string[], animations?:AnimationEntryMetadata[], directives?:Array, pipes?:Array, encapsulation?:ViewEncapsulation})', + 'ComponentMetadata.constructor({selector,inputs,outputs,properties,events,host,exportAs,moduleId,providers,viewProviders,changeDetection=ChangeDetectionStrategy.Default,queries,templateUrl,template,styleUrls,styles,animations,directives,pipes,encapsulation}:{selector?:string, inputs?:string[], outputs?:string[], properties?:string[], events?:string[], host?:{[key:string]:string}, providers?:any[], exportAs?:string, moduleId?:string, viewProviders?:any[], queries?:{[key:string]:any}, changeDetection?:ChangeDetectionStrategy, templateUrl?:string, template?:string, styleUrls?:string[], styles?:string[], animations?:AnimationEntryMetadata[], directives?:Array, pipes?:Array, encapsulation?:ViewEncapsulation}={})', 'ComponentMetadata.directives:Array', 'ComponentMetadata.encapsulation:ViewEncapsulation', 'ComponentMetadata.moduleId:string', 'ComponentMetadata.pipes:Array', - 'ComponentMetadata.styles:string[]', 'ComponentMetadata.styleUrls:string[]', + 'ComponentMetadata.styles:string[]', 'ComponentMetadata.template:string', 'ComponentMetadata.templateUrl:string', 'ComponentMetadata.viewProviders:any[]', @@ -145,24 +158,12 @@ const CORE = [ 'ComponentResolver', 'ComponentResolver.clearCache():any', 'ComponentResolver.resolveComponent(component:Type|string):Promise>', - 'const APP_ID:any', - 'const APP_INITIALIZER:any', - 'const APPLICATION_COMMON_PROVIDERS:Array', - 'const PACKAGE_ROOT_URL:any', - 'const PLATFORM_COMMON_PROVIDERS:Array', - 'const PLATFORM_DIRECTIVES:OpaqueToken', - 'const PLATFORM_INITIALIZER:any', - 'const PLATFORM_PIPES:OpaqueToken', 'ContentChildMetadata', - 'ContentChildMetadata.constructor(_selector:Type|string, {read=null}:{read?:any})', + 'ContentChildMetadata.constructor(_selector:Type|string, {read=null}:{read?:any}={})', 'ContentChildMetadataFactory', 'ContentChildrenMetadata', - 'ContentChildrenMetadata.constructor(_selector:Type|string, {descendants=false,read=null}:{descendants?:boolean, read?:any})', + 'ContentChildrenMetadata.constructor(_selector:Type|string, {descendants=false,read=null}:{descendants?:boolean, read?:any}={})', 'ContentChildrenMetadataFactory', - 'coreBootstrap(componentFactory:ComponentFactory, injector:Injector):ComponentRef', - 'coreLoadAndBootstrap(componentType:Type, injector:Injector):Promise>', - 'createNgZone():NgZone', - 'createPlatform(injector:Injector):PlatformRef', 'CyclicDependencyError', 'CyclicDependencyError.constructor(injector:ReflectiveInjector, key:ReflectiveKey)', 'DebugElement', @@ -195,7 +196,7 @@ const CORE = [ 'DefaultIterableDiffer', 'DefaultIterableDiffer.check(collection:any):boolean', 'DefaultIterableDiffer.collection:any', - 'DefaultIterableDiffer.constructor(_trackByFn:TrackByFn)', + 'DefaultIterableDiffer.constructor(_trackByFn?:TrackByFn)', 'DefaultIterableDiffer.diff(collection:any):DefaultIterableDiffer', 'DefaultIterableDiffer.forEachAddedItem(fn:Function):any', 'DefaultIterableDiffer.forEachIdentityChange(fn:Function):any', @@ -209,7 +210,7 @@ const CORE = [ 'DefaultIterableDiffer.toString():string', 'DirectiveDecorator', 'DirectiveMetadata', - 'DirectiveMetadata.constructor({selector,inputs,outputs,properties,events,host,providers,exportAs,queries}:{selector?:string, inputs?:string[], outputs?:string[], properties?:string[], events?:string[], host?:{[key:string]:string}, providers?:any[], exportAs?:string, queries?:{[key:string]:any}})', + 'DirectiveMetadata.constructor({selector,inputs,outputs,properties,events,host,providers,exportAs,queries}:{selector?:string, inputs?:string[], outputs?:string[], properties?:string[], events?:string[], host?:{[key:string]:string}, providers?:any[], exportAs?:string, queries?:{[key:string]:any}}={})', 'DirectiveMetadata.events:string[]', 'DirectiveMetadata.exportAs:string', 'DirectiveMetadata.host:{[key:string]:string}', @@ -220,12 +221,11 @@ const CORE = [ 'DirectiveMetadata.queries:{[key:string]:any}', 'DirectiveMetadata.selector:string', 'DirectiveMetadataFactory', - 'disposePlatform():void', 'DoCheck', 'DoCheck.ngDoCheck():any', 'DynamicComponentLoader', - 'DynamicComponentLoader.loadAsRoot(type:Type, overrideSelectorOrNode:string|any, injector:Injector, onDispose:() => void, projectableNodes:any[][]):Promise>', - 'DynamicComponentLoader.loadNextToLocation(type:Type, location:ViewContainerRef, providers:ResolvedReflectiveProvider[], projectableNodes:any[][]):Promise>', + 'DynamicComponentLoader.loadAsRoot(type:Type, overrideSelectorOrNode:string|any, injector:Injector, onDispose?:() => void, projectableNodes?:any[][]):Promise>', + 'DynamicComponentLoader.loadNextToLocation(type:Type, location:ViewContainerRef, providers?:ResolvedReflectiveProvider[], projectableNodes?:any[][]):Promise>', 'ElementRef', 'ElementRef.constructor(nativeElement:any)', 'ElementRef.nativeElement:any', @@ -233,46 +233,47 @@ const CORE = [ 'EmbeddedViewRef.destroy():any', 'EmbeddedViewRef.rootNodes:any[]', 'EmbeddedViewRef', - 'enableProdMode():any', - 'EventEmitter.constructor(isAsync:boolean)', + 'EventEmitter.constructor(isAsync:boolean=false)', 'EventEmitter.emit(value:T):any', 'EventEmitter.next(value:any):any', - 'EventEmitter.subscribe(generatorOrNext:any, error:any, complete:any):any', + 'EventEmitter.subscribe(generatorOrNext?:any, error?:any, complete?:any):any', 'EventEmitter', 'ExceptionHandler', - 'ExceptionHandler.call(exception:any, stackTrace:any, reason:string):void', - 'ExceptionHandler.constructor(_logger:any, _rethrowException:boolean)', - 'ExceptionHandler.exceptionToString(exception:any, stackTrace:any, reason:string):string', + 'ExceptionHandler.call(exception:any, stackTrace:any=null, reason:string=null):void', + 'ExceptionHandler.constructor(_logger:any, _rethrowException:boolean=true)', + 'ExceptionHandler.exceptionToString(exception:any, stackTrace:any=null, reason:string=null):string', 'ExpressionChangedAfterItHasBeenCheckedException', 'ExpressionChangedAfterItHasBeenCheckedException.constructor(oldValue:any, currValue:any, context:any)', - 'forwardRef(forwardRefFn:ForwardRefFn):Type', 'ForwardRefFn', - 'getDebugNode(nativeNode:any):DebugNode', - 'getPlatform():PlatformRef', 'GetTestability', 'GetTestability.addToWindow(registry:TestabilityRegistry):void', 'GetTestability.findTestabilityInTree(registry:TestabilityRegistry, elem:any, findInAncestors:boolean):Testability', 'HostBindingMetadata', - 'HostBindingMetadata.constructor(hostPropertyName:string)', + 'HostBindingMetadata.constructor(hostPropertyName?:string)', + 'HostBindingMetadata.hostPropertyName?:string', 'HostBindingMetadataFactory', 'HostListenerMetadata', - 'HostListenerMetadata.constructor(eventName:string, args:string[])', + 'HostListenerMetadata.args?:string[]', + 'HostListenerMetadata.constructor(eventName:string, args?:string[])', + 'HostListenerMetadata.eventName:string', 'HostListenerMetadataFactory', 'HostMetadata', 'HostMetadata.toString():string', 'HostMetadataFactory', - 'InjectableMetadata', - 'InjectableMetadata.constructor()', - 'InjectableMetadataFactory', 'InjectMetadata', 'InjectMetadata.constructor(token:any)', 'InjectMetadata.toString():string', + 'InjectMetadata.token:any', 'InjectMetadataFactory', + 'InjectableMetadata', + 'InjectableMetadata.constructor()', + 'InjectableMetadataFactory', 'Injector', - 'Injector.get(token:any, notFoundValue:any):any', 'Injector.THROW_IF_NOT_FOUND:any', + 'Injector.get(token:any, notFoundValue?:any):any', 'InputMetadata', - 'InputMetadata.constructor(bindingPropertyName:string)', + 'InputMetadata.bindingPropertyName?:string', + 'InputMetadata.constructor(bindingPropertyName?:string)', 'InputMetadataFactory', 'InstantiationError', 'InstantiationError.addKey(injector:ReflectiveInjector, key:ReflectiveKey):void', @@ -288,16 +289,18 @@ const CORE = [ 'IterableDiffer.diff(object:any):any', 'IterableDiffer.onDestroy():any', 'IterableDifferFactory', - 'IterableDifferFactory.create(cdRef:ChangeDetectorRef, trackByFn:TrackByFn):IterableDiffer', + 'IterableDifferFactory.create(cdRef:ChangeDetectorRef, trackByFn?:TrackByFn):IterableDiffer', 'IterableDifferFactory.supports(objects:any):boolean', 'IterableDiffers', 'IterableDiffers.constructor(factories:IterableDifferFactory[])', - 'IterableDiffers.create(factories:IterableDifferFactory[], parent:IterableDiffers):IterableDiffers', + 'IterableDiffers.create(factories:IterableDifferFactory[], parent?:IterableDiffers):IterableDiffers', 'IterableDiffers.extend(factories:IterableDifferFactory[]):Provider', + 'IterableDiffers.factories:IterableDifferFactory[]', 'IterableDiffers.find(iterable:any):IterableDifferFactory', 'KeyValueChangeRecord', 'KeyValueChangeRecord.constructor(key:any)', 'KeyValueChangeRecord.currentValue:any', + 'KeyValueChangeRecord.key:any', 'KeyValueChangeRecord.previousValue:any', 'KeyValueChangeRecord.toString():string', 'KeyValueDiffer', @@ -308,8 +311,9 @@ const CORE = [ 'KeyValueDifferFactory.supports(objects:any):boolean', 'KeyValueDiffers', 'KeyValueDiffers.constructor(factories:KeyValueDifferFactory[])', - 'KeyValueDiffers.create(factories:KeyValueDifferFactory[], parent:KeyValueDiffers):KeyValueDiffers', + 'KeyValueDiffers.create(factories:KeyValueDifferFactory[], parent?:KeyValueDiffers):KeyValueDiffers', 'KeyValueDiffers.extend(factories:KeyValueDifferFactory[]):Provider', + 'KeyValueDiffers.factories:KeyValueDifferFactory[]', 'KeyValueDiffers.find(kv:Object):KeyValueDifferFactory', 'NgZone', 'NgZone.assertInAngularZone():void', @@ -328,6 +332,8 @@ const CORE = [ 'NgZone.runOutsideAngular(fn:() => any):any', 'NgZoneError', 'NgZoneError.constructor(error:any, stackTrace:any)', + 'NgZoneError.error:any', + 'NgZoneError.stackTrace:any', 'NoAnnotationError', 'NoAnnotationError.constructor(typeOrFunc:any, params:any[][])', 'NoProviderError', @@ -347,7 +353,8 @@ const CORE = [ 'OutOfBoundsError', 'OutOfBoundsError.constructor(index:any)', 'OutputMetadata', - 'OutputMetadata.constructor(bindingPropertyName:string)', + 'OutputMetadata.bindingPropertyName?:string', + 'OutputMetadata.constructor(bindingPropertyName?:string)', 'OutputMetadataFactory', 'PipeMetadata', 'PipeMetadata.constructor({name,pure}:{name:string, pure?:boolean})', @@ -361,7 +368,6 @@ const CORE = [ 'PlatformRef.disposed:boolean', 'PlatformRef.injector:Injector', 'PlatformRef.registerDisposeListener(dispose:() => void):void', - 'provide(token:any, {useClass,useValue,useExisting,useFactory,deps,multi}:{useClass?:Type, useValue?:any, useExisting?:any, useFactory?:Function, deps?:Object[], multi?:boolean}):Provider', 'Provider', 'Provider.constructor(token:any, {useClass,useValue,useExisting,useFactory,deps,multi}:{useClass?:Type, useValue?:any, useExisting?:any, useFactory?:Function, deps?:Object[], multi?:boolean})', 'Provider.dependencies:Object[]', @@ -375,8 +381,9 @@ const CORE = [ 'ProviderBuilder.constructor(token:any)', 'ProviderBuilder.toAlias(aliasToken:any):Provider', 'ProviderBuilder.toClass(type:Type):Provider', - 'ProviderBuilder.toFactory(factory:Function, dependencies:any[]):Provider', + 'ProviderBuilder.toFactory(factory:Function, dependencies?:any[]):Provider', 'ProviderBuilder.toValue(value:any):Provider', + 'ProviderBuilder.token:any', 'QueryList.changes:Observable', 'QueryList.dirty:any', 'QueryList.filter(fn:(item: T) => boolean):T[]', @@ -393,7 +400,7 @@ const CORE = [ 'QueryList.toString():string', 'QueryList', 'QueryMetadata', - 'QueryMetadata.constructor(_selector:Type|string, {descendants=false,first=false,read=null}:{descendants?:boolean, first?:boolean, read?:any})', + 'QueryMetadata.constructor(_selector:Type|string, {descendants=false,first=false,read=null}:{descendants?:boolean, first?:boolean, read?:any}={})', 'QueryMetadata.descendants:boolean', 'QueryMetadata.first:boolean', 'QueryMetadata.isVarBindingQuery:boolean', @@ -407,35 +414,42 @@ const CORE = [ 'ReflectiveInjector.createChildFromResolved(providers:ResolvedReflectiveProvider[]):ReflectiveInjector', 'ReflectiveInjector.debugContext():any', 'ReflectiveInjector.fromResolvedBindings(providers:ResolvedReflectiveProvider[]):ReflectiveInjector', - 'ReflectiveInjector.fromResolvedProviders(providers:ResolvedReflectiveProvider[], parent:Injector):ReflectiveInjector', - 'ReflectiveInjector.get(token:any, notFoundValue:any):any', + 'ReflectiveInjector.fromResolvedProviders(providers:ResolvedReflectiveProvider[], parent:Injector=null):ReflectiveInjector', + 'ReflectiveInjector.get(token:any, notFoundValue?:any):any', 'ReflectiveInjector.instantiateResolved(provider:ResolvedReflectiveProvider):any', 'ReflectiveInjector.parent:Injector', 'ReflectiveInjector.resolve(providers:Array):ResolvedReflectiveProvider[]', - 'ReflectiveInjector.resolveAndCreate(providers:Array, parent:Injector):ReflectiveInjector', + 'ReflectiveInjector.resolveAndCreate(providers:Array, parent:Injector=null):ReflectiveInjector', 'ReflectiveInjector.resolveAndCreateChild(providers:Array):ReflectiveInjector', 'ReflectiveInjector.resolveAndInstantiate(provider:Type|Provider):any', 'ReflectiveKey', 'ReflectiveKey.constructor(token:Object, id:number)', 'ReflectiveKey.displayName:string', 'ReflectiveKey.get(token:Object):ReflectiveKey', + 'ReflectiveKey.id:number', 'ReflectiveKey.numberOfKeys:number', + 'ReflectiveKey.token:Object', 'RenderComponentType', 'RenderComponentType.constructor(id:string, templateUrl:string, slotCount:number, encapsulation:ViewEncapsulation, styles:Array)', + 'RenderComponentType.encapsulation:ViewEncapsulation', + 'RenderComponentType.id:string', + 'RenderComponentType.slotCount:number', + 'RenderComponentType.styles:Array', + 'RenderComponentType.templateUrl:string', 'Renderer', 'Renderer.animate(element:any, startingStyles:AnimationStyles, keyframes:AnimationKeyframe[], duration:number, delay:number, easing:string):AnimationPlayer', 'Renderer.attachViewAfter(node:any, viewRootNodes:any[]):void', - 'Renderer.createElement(parentElement:any, name:string, debugInfo:RenderDebugInfo):any', - 'Renderer.createTemplateAnchor(parentElement:any, debugInfo:RenderDebugInfo):any', - 'Renderer.createText(parentElement:any, value:string, debugInfo:RenderDebugInfo):any', + 'Renderer.createElement(parentElement:any, name:string, debugInfo?:RenderDebugInfo):any', + 'Renderer.createTemplateAnchor(parentElement:any, debugInfo?:RenderDebugInfo):any', + 'Renderer.createText(parentElement:any, value:string, debugInfo?:RenderDebugInfo):any', 'Renderer.createViewRoot(hostElement:any):any', 'Renderer.destroyView(hostElement:any, viewAllNodes:any[]):void', 'Renderer.detachView(viewRootNodes:any[]):void', - 'Renderer.invokeElementMethod(renderElement:any, methodName:string, args:any[]):any', + 'Renderer.invokeElementMethod(renderElement:any, methodName:string, args?:any[]):any', 'Renderer.listen(renderElement:any, name:string, callback:Function):Function', 'Renderer.listenGlobal(target:string, name:string, callback:Function):Function', 'Renderer.projectNodes(parentElement:any, nodes:any[]):void', - 'Renderer.selectRootElement(selectorOrNode:string|any, debugInfo:RenderDebugInfo):any', + 'Renderer.selectRootElement(selectorOrNode:string|any, debugInfo?:RenderDebugInfo):any', 'Renderer.setBindingDebugInfo(renderElement:any, propertyName:string, propertyValue:string):void', 'Renderer.setElementAttribute(renderElement:any, attributeName:string, attributeValue:string):void', 'Renderer.setElementClass(renderElement:any, className:string, isAdd:boolean):any', @@ -446,20 +460,22 @@ const CORE = [ 'ResolvedReflectiveBinding', 'ResolvedReflectiveFactory', 'ResolvedReflectiveFactory.constructor(factory:Function, dependencies:ReflectiveDependency[])', + 'ResolvedReflectiveFactory.dependencies:ReflectiveDependency[]', + 'ResolvedReflectiveFactory.factory:Function', 'ResolvedReflectiveProvider', 'ResolvedReflectiveProvider.key:ReflectiveKey', 'ResolvedReflectiveProvider.multiProvider:boolean', 'ResolvedReflectiveProvider.resolvedFactories:ResolvedReflectiveFactory[]', - 'resolveForwardRef(type:any):any', 'RootRenderer', 'RootRenderer.renderComponent(componentType:RenderComponentType):Renderer', 'SelfMetadata', 'SelfMetadata.toString():string', 'SelfMetadataFactory', - 'setTestabilityGetter(getter:GetTestability):void', 'SimpleChange', 'SimpleChange.constructor(previousValue:any, currentValue:any)', + 'SimpleChange.currentValue:any', 'SimpleChange.isFirstChange():boolean', + 'SimpleChange.previousValue:any', 'SimpleChanges', 'SkipSelfMetadata', 'SkipSelfMetadata.toString():string', @@ -482,16 +498,104 @@ const CORE = [ 'Testability.whenStable(callback:Function):void', 'TestabilityRegistry', 'TestabilityRegistry.constructor()', - 'TestabilityRegistry.findTestabilityInTree(elem:Node, findInAncestors:boolean):Testability', + 'TestabilityRegistry.findTestabilityInTree(elem:Node, findInAncestors:boolean=true):Testability', 'TestabilityRegistry.getAllRootElements():any[]', 'TestabilityRegistry.getAllTestabilities():Testability[]', 'TestabilityRegistry.getTestability(elem:any):Testability', 'TestabilityRegistry.registerApplication(token:any, testability:Testability):any', 'TrackByFn', 'TypeDecorator', - 'TypeDecorator.annotations:any[]', 'TypeDecorator.Class(obj:ClassDefinition):ConcreteType', - 'var __core_private__:any', + 'TypeDecorator.annotations:any[]', + 'ViewChildMetadata', + 'ViewChildMetadata.constructor(_selector:Type|string, {read=null}:{read?:any}={})', + 'ViewChildMetadataFactory', + 'ViewChildrenMetadata', + 'ViewChildrenMetadata.constructor(_selector:Type|string, {read=null}:{read?:any}={})', + 'ViewChildrenMetadataFactory', + 'ViewContainerRef', + 'ViewContainerRef.clear():void', + 'ViewContainerRef.createComponent(componentFactory:ComponentFactory, index?:number, injector?:Injector, projectableNodes?:any[][]):ComponentRef', + 'ViewContainerRef.createEmbeddedView(templateRef:TemplateRef, context?:C, index?:number):EmbeddedViewRef', + 'ViewContainerRef.detach(index?:number):ViewRef', + 'ViewContainerRef.element:ElementRef', + 'ViewContainerRef.get(index:number):ViewRef', + 'ViewContainerRef.indexOf(viewRef:ViewRef):number', + 'ViewContainerRef.injector:Injector', + 'ViewContainerRef.insert(viewRef:ViewRef, index?:number):ViewRef', + 'ViewContainerRef.length:number', + 'ViewContainerRef.parentInjector:Injector', + 'ViewContainerRef.remove(index?:number):void', + 'ViewDecorator', + 'ViewDecorator.View(obj:{templateUrl?:string, template?:string, directives?:Array, pipes?:Array, renderer?:string, styles?:string[], styleUrls?:string[], animations?:AnimationEntryMetadata[]}):ViewDecorator', + 'ViewEncapsulation', + 'ViewEncapsulation.Emulated', + 'ViewEncapsulation.Native', + 'ViewEncapsulation.None', + 'ViewMetadata', + 'ViewMetadata.animations:AnimationEntryMetadata[]', + 'ViewMetadata.constructor({templateUrl,template,directives,pipes,encapsulation,styles,styleUrls,animations}:{templateUrl?:string, template?:string, directives?:Array, pipes?:Array, encapsulation?:ViewEncapsulation, styles?:string[], styleUrls?:string[], animations?:AnimationEntryMetadata[]}={})', + 'ViewMetadata.directives:Array', + 'ViewMetadata.encapsulation:ViewEncapsulation', + 'ViewMetadata.pipes:Array', + 'ViewMetadata.styleUrls:string[]', + 'ViewMetadata.styles:string[]', + 'ViewMetadata.template:string', + 'ViewMetadata.templateUrl:string', + 'ViewMetadataFactory', + 'ViewQueryMetadata', + 'ViewQueryMetadata.constructor(_selector:Type|string, {descendants=false,first=false,read=null}:{descendants?:boolean, first?:boolean, read?:any}={})', + 'ViewQueryMetadata.isViewQuery:any', + 'ViewQueryMetadata.toString():string', + 'ViewRef', + 'ViewRef.destroyed:boolean', + 'ViewRef.onDestroy(callback:Function):any', + 'WrappedException', + 'WrappedException.constructor(_wrapperMessage:string, _originalException:any, _originalStack?:any, _context?:any)', + 'WrappedException.context:any', + 'WrappedException.message:string', + 'WrappedException.originalException:any', + 'WrappedException.originalStack:any', + 'WrappedException.toString():string', + 'WrappedException.wrapperMessage:string', + 'WrappedException.wrapperStack:any', + 'WrappedValue', + 'WrappedValue.constructor(wrapped:any)', + 'WrappedValue.wrap(value:any):WrappedValue', + 'WrappedValue.wrapped:any', + 'WtfScopeFn', + 'animate(timing:string|number, styles:AnimationStyleMetadata|AnimationKeyframesSequenceMetadata=null):AnimationAnimateMetadata', + 'asNativeElements(debugEls:DebugElement[]):any', + 'assertPlatform(requiredToken:any):PlatformRef', + 'bind(token:any):ProviderBuilder', + 'const APPLICATION_COMMON_PROVIDERS:Array', + 'const APP_ID:any', + 'const APP_INITIALIZER:any', + 'const AUTO_STYLE:any', + 'const PACKAGE_ROOT_URL:any', + 'const PLATFORM_COMMON_PROVIDERS:Array', + 'const PLATFORM_DIRECTIVES:OpaqueToken', + 'const PLATFORM_INITIALIZER:any', + 'const PLATFORM_PIPES:OpaqueToken', + 'coreBootstrap(componentFactory:ComponentFactory, injector:Injector):ComponentRef', + 'coreLoadAndBootstrap(componentType:Type, injector:Injector):Promise>', + 'createNgZone():NgZone', + 'createPlatform(injector:Injector):PlatformRef', + 'disposePlatform():void', + 'enableProdMode():any', + 'forwardRef(forwardRefFn:ForwardRefFn):Type', + 'getDebugNode(nativeNode:any):DebugNode', + 'getPlatform():PlatformRef', + 'group(steps:AnimationMetadata[]):AnimationGroupMetadata', + 'keyframes(steps:AnimationStyleMetadata|AnimationStyleMetadata[]):AnimationKeyframesSequenceMetadata', + 'provide(token:any, {useClass,useValue,useExisting,useFactory,deps,multi}:{useClass?:Type, useValue?:any, useExisting?:any, useFactory?:Function, deps?:Object[], multi?:boolean}):Provider', + 'resolveForwardRef(type:any):any', + 'sequence(steps:AnimationMetadata[]):AnimationSequenceMetadata', + 'setTestabilityGetter(getter:GetTestability):void', + 'state(stateNameExpr:string, styles:AnimationStyleMetadata):AnimationStateDeclarationMetadata', + 'style(tokens:string|{[key:string]:string|number}|Array):AnimationStyleMetadata', + 'transition(stateChangeExpr:string, animationData:AnimationMetadata|AnimationMetadata[]):AnimationStateTransitionMetadata', + 'trigger(name:string, animation:AnimationMetadata|AnimationMetadata[]):AnimationEntryMetadata', 'var Attribute:AttributeMetadataFactory', 'var Component:ComponentMetadataFactory', 'var ContentChild:ContentChildMetadataFactory', @@ -513,99 +617,103 @@ const CORE = [ 'var ViewChild:ViewChildMetadataFactory', 'var ViewChildren:ViewChildrenMetadataFactory', 'var ViewQuery:QueryMetadataFactory', + 'var __core_private__:any', 'var wtfCreateScope:(signature: string, flags?: any) => impl.WtfScopeFn', 'var wtfEndTimeRange:(range: any) => void', 'var wtfLeave:(scope: any, returnValue?: T) => T', 'var wtfStartTimeRange:(rangeType: string, action: string) => any', - 'ViewChildMetadata', - 'ViewChildMetadata.constructor(_selector:Type|string, {read=null}:{read?:any})', - 'ViewChildMetadataFactory', - 'ViewChildrenMetadata', - 'ViewChildrenMetadata.constructor(_selector:Type|string, {read=null}:{read?:any})', - 'ViewChildrenMetadataFactory', - 'ViewContainerRef', - 'ViewContainerRef.clear():void', - 'ViewContainerRef.createComponent(componentFactory:ComponentFactory, index:number, injector:Injector, projectableNodes:any[][]):ComponentRef', - 'ViewContainerRef.createEmbeddedView(templateRef:TemplateRef, context:C, index:number):EmbeddedViewRef', - 'ViewContainerRef.detach(index:number):ViewRef', - 'ViewContainerRef.element:ElementRef', - 'ViewContainerRef.get(index:number):ViewRef', - 'ViewContainerRef.indexOf(viewRef:ViewRef):number', - 'ViewContainerRef.injector:Injector', - 'ViewContainerRef.insert(viewRef:ViewRef, index:number):ViewRef', - 'ViewContainerRef.length:number', - 'ViewContainerRef.parentInjector:Injector', - 'ViewContainerRef.remove(index:number):void', - 'ViewDecorator', - 'ViewDecorator.View(obj:{templateUrl?:string, template?:string, directives?:Array, pipes?:Array, renderer?:string, styles?:string[], styleUrls?:string[], animations?:AnimationEntryMetadata[]}):ViewDecorator', - 'ViewEncapsulation', - 'ViewEncapsulation.Emulated', - 'ViewEncapsulation.Native', - 'ViewEncapsulation.None', - 'ViewMetadata', - 'ViewMetadata.animations:AnimationEntryMetadata[]', - 'ViewMetadata.constructor({templateUrl,template,directives,pipes,encapsulation,styles,styleUrls,animations}:{templateUrl?:string, template?:string, directives?:Array, pipes?:Array, encapsulation?:ViewEncapsulation, styles?:string[], styleUrls?:string[], animations?:AnimationEntryMetadata[]})', - 'ViewMetadata.directives:Array', - 'ViewMetadata.encapsulation:ViewEncapsulation', - 'ViewMetadata.pipes:Array', - 'ViewMetadata.styles:string[]', - 'ViewMetadata.styleUrls:string[]', - 'ViewMetadata.template:string', - 'ViewMetadata.templateUrl:string', - 'ViewMetadataFactory', - 'ViewQueryMetadata', - 'ViewQueryMetadata.constructor(_selector:Type|string, {descendants=false,first=false,read=null}:{descendants?:boolean, first?:boolean, read?:any})', - 'ViewQueryMetadata.isViewQuery:any', - 'ViewQueryMetadata.toString():string', - 'ViewRef', - 'ViewRef.destroyed:boolean', - 'ViewRef.onDestroy(callback:Function):any', - 'WrappedException', - 'WrappedException.constructor(_wrapperMessage:string, _originalException:any, _originalStack:any, _context:any)', - 'WrappedException.context:any', - 'WrappedException.message:string', - 'WrappedException.originalException:any', - 'WrappedException.originalStack:any', - 'WrappedException.toString():string', - 'WrappedException.wrapperMessage:string', - 'WrappedException.wrapperStack:any', - 'WrappedValue', - 'WrappedValue.constructor(wrapped:any)', - 'WrappedValue.wrap(value:any):WrappedValue', - 'WtfScopeFn', - 'animate(timing:string|number, styles:AnimationStyleMetadata|AnimationKeyframesSequenceMetadata):AnimationAnimateMetadata', - 'const AUTO_STYLE:any', - 'group(steps:AnimationMetadata[]):AnimationGroupMetadata', - 'keyframes(steps:AnimationStyleMetadata|AnimationStyleMetadata[]):AnimationKeyframesSequenceMetadata', - 'sequence(steps:AnimationMetadata[]):AnimationSequenceMetadata', - 'state(stateNameExpr:string, styles:AnimationStyleMetadata):AnimationStateDeclarationMetadata', - 'style(tokens:string|{[key:string]:string|number}|Array):AnimationStyleMetadata', - 'transition(stateChangeExpr:string, animationData:AnimationMetadata|AnimationMetadata[]):AnimationStateTransitionMetadata', - 'trigger(name:string, animation:AnimationMetadata|AnimationMetadata[]):AnimationEntryMetadata', +]; + +const CORE_TESTING = [ + 'InjectSetupWrapper', + 'InjectSetupWrapper.constructor(_providers:() => any)', + 'InjectSetupWrapper.inject(tokens:any[], fn:Function):Function', + 'InjectSetupWrapper.injectAsync(tokens:any[], fn:Function):Function', + 'Log', + 'Log.add(value:any):void', + 'Log.clear():void', + 'Log.constructor()', + 'Log.fn(value:any):any', + 'Log.logItems:any[]', + 'Log.result():string', + 'MockApplicationRef', + 'MockApplicationRef.bootstrap(componentFactory:ComponentFactory):ComponentRef', + 'MockApplicationRef.componentTypes:Type[]', + 'MockApplicationRef.dispose():void', + 'MockApplicationRef.injector:Injector', + 'MockApplicationRef.registerBootstrapListener(listener:(ref: ComponentRef) => void):void', + 'MockApplicationRef.registerDisposeListener(dispose:() => void):void', + 'MockApplicationRef.run(callback:Function):any', + 'MockApplicationRef.tick():void', + 'MockApplicationRef.waitForAsyncInitializers():Promise', + 'MockApplicationRef.zone:NgZone', + 'MockNgZone', + 'MockNgZone.constructor()', + 'MockNgZone.onStable:any', + 'MockNgZone.run(fn:Function):any', + 'MockNgZone.runOutsideAngular(fn:Function):any', + 'MockNgZone.simulateZoneExit():void', + 'TestInjector', + 'TestInjector.addProviders(providers:Array):any', + 'TestInjector.applicationProviders:Array', + 'TestInjector.createInjector():any', + 'TestInjector.execute(tokens:any[], fn:Function):any', + 'TestInjector.get(token:any):any', + 'TestInjector.platformProviders:Array', + 'TestInjector.reset():any', + 'async(fn:Function):Function', + 'beforeEach(fn:Function):void', + 'beforeEachProviders(fn:any):void', + 'clearPendingTimers():void', + 'containsRegexp(input:string):RegExp', + 'discardPeriodicTasks():void', + 'fakeAsync(fn:Function):Function', + 'fit(name:string, fn:Function, timeOut:number=null):void', + 'flushMicrotasks():void', + 'getTestInjector():any', + 'getTypeOf(instance:any):any', + 'iit(name:string, fn:Function, timeOut:number=null):void', + 'inject(tokens:any[], fn:Function):Function', + 'injectAsync(tokens:any[], fn:Function):Function', + 'instantiateType(type:Function, params:any[]=[]):any', + 'it(name:string, fn:Function, timeOut:number=null):void', + 'resetBaseTestProviders():any', + 'setBaseTestProviders(platformProviders:Array, applicationProviders:Array):any', + 'tick(millis:number=0):void', + 'var afterEach:Function', + 'var ddescribe:Function', + 'var describe:Function', + 'var expect:Function', + 'var fdescribe:Function', + 'var xdescribe:Function', + 'withProviders(providers:() => any):any', + 'xit(name:string, fn:Function, timeOut:number=null):void', ]; const COMMON = [ 'AbstractControl', + 'AbstractControl.asyncValidator:AsyncValidatorFn', 'AbstractControl.constructor(validator:ValidatorFn, asyncValidator:AsyncValidatorFn)', 'AbstractControl.dirty:boolean', 'AbstractControl.errors:{[key:string]:any}', 'AbstractControl.find(path:Array|string):AbstractControl', - 'AbstractControl.getError(errorCode:string, path:string[]):any', - 'AbstractControl.hasError(errorCode:string, path:string[]):boolean', - 'AbstractControl.markAsDirty({onlySelf}:{onlySelf?:boolean}):void', - 'AbstractControl.markAsPending({onlySelf}:{onlySelf?:boolean}):void', + 'AbstractControl.getError(errorCode:string, path:string[]=null):any', + 'AbstractControl.hasError(errorCode:string, path:string[]=null):boolean', + 'AbstractControl.markAsDirty({onlySelf}:{onlySelf?:boolean}={}):void', + 'AbstractControl.markAsPending({onlySelf}:{onlySelf?:boolean}={}):void', 'AbstractControl.markAsTouched():void', 'AbstractControl.pending:boolean', 'AbstractControl.pristine:boolean', 'AbstractControl.root:AbstractControl', - 'AbstractControl.setErrors(errors:{[key:string]:any}, {emitEvent}:{emitEvent?:boolean}):void', + 'AbstractControl.setErrors(errors:{[key:string]:any}, {emitEvent}:{emitEvent?:boolean}={}):void', 'AbstractControl.setParent(parent:ControlGroup|ControlArray):void', 'AbstractControl.status:string', 'AbstractControl.statusChanges:Observable', 'AbstractControl.touched:boolean', 'AbstractControl.untouched:boolean', - 'AbstractControl.updateValueAndValidity({onlySelf,emitEvent}:{onlySelf?:boolean, emitEvent?:boolean}):void', + 'AbstractControl.updateValueAndValidity({onlySelf,emitEvent}:{onlySelf?:boolean, emitEvent?:boolean}={}):void', 'AbstractControl.valid:boolean', + 'AbstractControl.validator:ValidatorFn', 'AbstractControl.value:any', 'AbstractControl.valueChanges:Observable', 'AbstractControlDirective', @@ -629,23 +737,14 @@ const COMMON = [ 'CheckboxControlValueAccessor.registerOnChange(fn:(_: any) => {}):void', 'CheckboxControlValueAccessor.registerOnTouched(fn:() => {}):void', 'CheckboxControlValueAccessor.writeValue(value:any):void', - 'const APP_BASE_HREF:OpaqueToken', - 'const COMMON_DIRECTIVES:Type[][]', - 'const COMMON_PIPES:any', - 'const CORE_DIRECTIVES:Type[]', - 'const FORM_BINDINGS:any', - 'const FORM_DIRECTIVES:Type[]', - 'const FORM_PROVIDERS:Type[]', - 'const NG_ASYNC_VALIDATORS:OpaqueToken', - 'const NG_VALIDATORS:OpaqueToken', - 'const NG_VALUE_ACCESSOR:OpaqueToken', 'Control', - 'Control.constructor(value:any, validator:ValidatorFn, asyncValidator:AsyncValidatorFn)', + 'Control.constructor(value:any=null, validator:ValidatorFn=null, asyncValidator:AsyncValidatorFn=null)', 'Control.registerOnChange(fn:Function):void', - 'Control.updateValue(value:any, {onlySelf,emitEvent,emitModelToViewChange}:{onlySelf?:boolean, emitEvent?:boolean, emitModelToViewChange?:boolean}):void', + 'Control.updateValue(value:any, {onlySelf,emitEvent,emitModelToViewChange}:{onlySelf?:boolean, emitEvent?:boolean, emitModelToViewChange?:boolean}={}):void', 'ControlArray', 'ControlArray.at(index:number):AbstractControl', - 'ControlArray.constructor(controls:AbstractControl[], validator:ValidatorFn, asyncValidator:AsyncValidatorFn)', + 'ControlArray.constructor(controls:AbstractControl[], validator:ValidatorFn=null, asyncValidator:AsyncValidatorFn=null)', + 'ControlArray.controls:AbstractControl[]', 'ControlArray.insert(index:number, control:AbstractControl):void', 'ControlArray.length:number', 'ControlArray.push(control:AbstractControl):void', @@ -656,8 +755,9 @@ const COMMON = [ 'ControlContainer.path:string[]', 'ControlGroup', 'ControlGroup.addControl(name:string, control:AbstractControl):void', - 'ControlGroup.constructor(controls:{[key:string]:AbstractControl}, optionals:{[key:string]:boolean}, validator:ValidatorFn, asyncValidator:AsyncValidatorFn)', + 'ControlGroup.constructor(controls:{[key:string]:AbstractControl}, optionals:{[key:string]:boolean}=null, validator:ValidatorFn=null, asyncValidator:AsyncValidatorFn=null)', 'ControlGroup.contains(controlName:string):boolean', + 'ControlGroup.controls:{[key:string]:AbstractControl}', 'ControlGroup.exclude(controlName:string):void', 'ControlGroup.include(controlName:string):void', 'ControlGroup.removeControl(name:string):void', @@ -666,12 +766,11 @@ const COMMON = [ 'ControlValueAccessor.registerOnTouched(fn:any):void', 'ControlValueAccessor.writeValue(obj:any):void', 'CurrencyPipe', - 'CurrencyPipe.transform(value:any, currencyCode:string, symbolDisplay:boolean, digits:string):string', + 'CurrencyPipe.transform(value:any, currencyCode:string=\'USD\', symbolDisplay:boolean=false, digits:string=null):string', 'DatePipe', - 'DatePipe.supports(obj:any):boolean', - 'DatePipe.transform(value:any, pattern:string):string', + 'DatePipe.transform(value:any, pattern:string=\'mediumDate\'):string', 'DecimalPipe', - 'DecimalPipe.transform(value:any, digits:string):string', + 'DecimalPipe.transform(value:any, digits:string=null):string', 'DefaultValueAccessor', 'DefaultValueAccessor.constructor(_renderer:Renderer, _elementRef:ElementRef)', 'DefaultValueAccessor.onChange:any', @@ -688,12 +787,12 @@ const COMMON = [ 'Form.removeControlGroup(dir:NgControlGroup):void', 'Form.updateModel(dir:NgControl, value:any):void', 'FormBuilder', - 'FormBuilder.array(controlsConfig:any[], validator:ValidatorFn, asyncValidator:AsyncValidatorFn):ControlArray', - 'FormBuilder.control(value:Object, validator:ValidatorFn, asyncValidator:AsyncValidatorFn):Control', - 'FormBuilder.group(controlsConfig:{[key:string]:any}, extra:{[key:string]:any}):ControlGroup', + 'FormBuilder.array(controlsConfig:any[], validator:ValidatorFn=null, asyncValidator:AsyncValidatorFn=null):ControlArray', + 'FormBuilder.control(value:Object, validator:ValidatorFn=null, asyncValidator:AsyncValidatorFn=null):Control', + 'FormBuilder.group(controlsConfig:{[key:string]:any}, extra:{[key:string]:any}=null):ControlGroup', 'HashLocationStrategy', 'HashLocationStrategy.back():void', - 'HashLocationStrategy.constructor(_platformLocation:PlatformLocation, _baseHref:string)', + 'HashLocationStrategy.constructor(_platformLocation:PlatformLocation, _baseHref?:string)', 'HashLocationStrategy.forward():void', 'HashLocationStrategy.getBaseHref():string', 'HashLocationStrategy.onPopState(fn:UrlChangeListener):void', @@ -711,16 +810,16 @@ const COMMON = [ 'Location.back():void', 'Location.constructor(platformStrategy:LocationStrategy)', 'Location.forward():void', - 'Location.go(path:string, query:string):void', - 'Location.isCurrentPathEqualTo(path:string, query:string):boolean', + 'Location.go(path:string, query:string=\'\'):void', + 'Location.isCurrentPathEqualTo(path:string, query:string=\'\'):boolean', 'Location.joinWithSlash(start:string, end:string):string', 'Location.normalize(url:string):string', 'Location.normalizeQueryParams(params:string):string', 'Location.path():string', 'Location.prepareExternalUrl(url:string):string', - 'Location.replaceState(path:string, query:string):void', + 'Location.replaceState(path:string, query:string=\'\'):void', 'Location.stripTrailingSlash(url:string):string', - 'Location.subscribe(onNext:(value: any) => void, onThrow:(exception: any) => void, onReturn:() => void):Object', + 'Location.subscribe(onNext:(value: any) => void, onThrow:(exception: any) => void=null, onReturn:() => void=null):Object', 'LocationStrategy', 'LocationStrategy.back():void', 'LocationStrategy.forward():void', @@ -799,9 +898,9 @@ const COMMON = [ 'NgForm.ngSubmit:any', 'NgForm.onSubmit():boolean', 'NgForm.path:string[]', + 'NgForm.submitted:boolean', 'NgForm.removeControl(dir:NgControl):void', 'NgForm.removeControlGroup(dir:NgControlGroup):void', - 'NgForm.submitted:boolean', 'NgForm.updateModel(dir:NgControl, value:any):void', 'NgFormControl', 'NgFormControl.asyncValidator:AsyncValidatorFn', @@ -829,9 +928,9 @@ const COMMON = [ 'NgFormModel.ngSubmit:any', 'NgFormModel.onSubmit():boolean', 'NgFormModel.path:string[]', + 'NgFormModel.submitted:boolean', 'NgFormModel.removeControl(dir:NgControl):void', 'NgFormModel.removeControlGroup(dir:NgControlGroup):any', - 'NgFormModel.submitted:boolean', 'NgFormModel.updateModel(dir:NgControl, value:any):void', 'NgIf', 'NgIf.constructor(_viewContainer:ViewContainerRef, _templateRef:TemplateRef)', @@ -856,6 +955,7 @@ const COMMON = [ 'NgPlural.ngPlural=(value:number)', 'NgPluralCase', 'NgPluralCase.constructor(value:string, template:TemplateRef, viewContainer:ViewContainerRef)', + 'NgPluralCase.value:string', 'NgSelectOption', 'NgSelectOption.constructor(_element:ElementRef, _renderer:Renderer, _select:SelectControlValueAccessor)', 'NgSelectOption.id:string', @@ -876,10 +976,9 @@ const COMMON = [ 'NgTemplateOutlet', 'NgTemplateOutlet.constructor(_viewContainerRef:ViewContainerRef)', 'NgTemplateOutlet.ngTemplateOutlet=(templateRef:TemplateRef)', - 'NumberPipe', 'PathLocationStrategy', 'PathLocationStrategy.back():void', - 'PathLocationStrategy.constructor(_platformLocation:PlatformLocation, href:string)', + 'PathLocationStrategy.constructor(_platformLocation:PlatformLocation, href?:string)', 'PathLocationStrategy.forward():void', 'PathLocationStrategy.getBaseHref():string', 'PathLocationStrategy.onPopState(fn:UrlChangeListener):void', @@ -891,7 +990,7 @@ const COMMON = [ 'PatternValidator.constructor(pattern:string)', 'PatternValidator.validate(c:AbstractControl):{[key:string]:any}', 'PercentPipe', - 'PercentPipe.transform(value:any, digits:string):string', + 'PercentPipe.transform(value:any, digits:string=null):string', 'PlatformLocation', 'PlatformLocation.back():void', 'PlatformLocation.forward():void', @@ -904,7 +1003,9 @@ const COMMON = [ 'PlatformLocation.replaceState(state:any, title:string, url:string):void', 'PlatformLocation.search:string', 'RadioButtonState', + 'RadioButtonState.checked:boolean', 'RadioButtonState.constructor(checked:boolean, value:string)', + 'RadioButtonState.value:string', 'ReplacePipe', 'ReplacePipe.transform(value:any, pattern:string|RegExp, replacement:Function|string):any', 'RequiredValidator', @@ -917,11 +1018,13 @@ const COMMON = [ 'SelectControlValueAccessor.value:any', 'SelectControlValueAccessor.writeValue(value:any):void', 'SlicePipe', - 'SlicePipe.transform(value:any, start:number, end:number):any', + 'SlicePipe.transform(value:any, start:number, end:number=null):any', 'UpperCasePipe', 'UpperCasePipe.transform(value:string):string', + // TODO: rename to LocationChangeEvent 'UrlChangeEvent', 'UrlChangeEvent.type:string', + // TODO: rename to LocationChangeListener 'UrlChangeListener', 'Validator', 'Validator.validate(c:AbstractControl):{[key:string]:any}', @@ -933,27 +1036,80 @@ const COMMON = [ 'Validators.nullValidator(c:AbstractControl):{[key:string]:boolean}', 'Validators.pattern(pattern:string):ValidatorFn', 'Validators.required(control:AbstractControl):{[key:string]:boolean}', + 'const APP_BASE_HREF:OpaqueToken', + 'const COMMON_DIRECTIVES:Type[][]', + 'const COMMON_PIPES:any', + 'const CORE_DIRECTIVES:Type[]', + 'const FORM_DIRECTIVES:Type[]', + 'const FORM_PROVIDERS:Type[]', + 'const NG_ASYNC_VALIDATORS:OpaqueToken', + 'const NG_VALIDATORS:OpaqueToken', + 'const NG_VALUE_ACCESSOR:OpaqueToken', +]; + +const COMMON_TESTING = [ + 'MockLocationStrategy', 'MockLocationStrategy.back():void', 'MockLocationStrategy.constructor()', + 'MockLocationStrategy.forward():void', 'MockLocationStrategy.getBaseHref():string', + 'MockLocationStrategy.internalBaseHref:string', 'MockLocationStrategy.internalPath:string', + 'MockLocationStrategy.internalTitle:string', + 'MockLocationStrategy.onPopState(fn:(value: any) => void):void', + 'MockLocationStrategy.path():string', + 'MockLocationStrategy.prepareExternalUrl(internal:string):string', + 'MockLocationStrategy.pushState(ctx:any, title:string, path:string, query:string):void', + 'MockLocationStrategy.replaceState(ctx:any, title:string, path:string, query:string):void', + 'MockLocationStrategy.simulatePopState(url:string):void', + 'MockLocationStrategy.urlChanges:string[]', 'SpyLocation', 'SpyLocation.back():any', + 'SpyLocation.forward():any', 'SpyLocation.go(path:string, query:string=\'\'):any', + 'SpyLocation.isCurrentPathEqualTo(path:string, query:string=\'\'):boolean', + 'SpyLocation.normalize(url:string):string', 'SpyLocation.path():string', + 'SpyLocation.prepareExternalUrl(url:string):string', + 'SpyLocation.replaceState(path:string, query:string=\'\'):any', + 'SpyLocation.setBaseHref(url:string):any', 'SpyLocation.setInitialPath(url:string):any', + 'SpyLocation.simulateHashChange(pathname:string):any', + 'SpyLocation.simulateUrlPop(pathname:string):any', + 'SpyLocation.subscribe(onNext:(value: any) => void, onThrow:(error: any) => void=null, onReturn:() => void=null):Object', + 'SpyLocation.urlChanges:string[]' ]; const COMPILER = [ 'AttrAst', 'AttrAst.constructor(name:string, value:string, sourceSpan:ParseSourceSpan)', + 'AttrAst.name:string', + 'AttrAst.sourceSpan:ParseSourceSpan', + 'AttrAst.value:string', 'AttrAst.visit(visitor:TemplateAstVisitor, context:any):any', 'BoundDirectivePropertyAst', 'BoundDirectivePropertyAst.constructor(directiveName:string, templateName:string, value:AST, sourceSpan:ParseSourceSpan)', + 'BoundDirectivePropertyAst.directiveName:string', + 'BoundDirectivePropertyAst.sourceSpan:ParseSourceSpan', + 'BoundDirectivePropertyAst.templateName:string', + 'BoundDirectivePropertyAst.value:AST', 'BoundDirectivePropertyAst.visit(visitor:TemplateAstVisitor, context:any):any', 'BoundElementPropertyAst', 'BoundElementPropertyAst.constructor(name:string, type:PropertyBindingType, securityContext:SecurityContext, value:AST, unit:string, sourceSpan:ParseSourceSpan)', + 'BoundElementPropertyAst.name:string', + 'BoundElementPropertyAst.securityContext:SecurityContext', + 'BoundElementPropertyAst.sourceSpan:ParseSourceSpan', + 'BoundElementPropertyAst.type:PropertyBindingType', + 'BoundElementPropertyAst.unit:string', + 'BoundElementPropertyAst.value:AST', 'BoundElementPropertyAst.visit(visitor:TemplateAstVisitor, context:any):any', 'BoundEventAst', 'BoundEventAst.constructor(name:string, target:string, handler:AST, sourceSpan:ParseSourceSpan)', 'BoundEventAst.fullName:any', + 'BoundEventAst.handler:AST', + 'BoundEventAst.name:string', + 'BoundEventAst.sourceSpan:ParseSourceSpan', + 'BoundEventAst.target:string', 'BoundEventAst.visit(visitor:TemplateAstVisitor, context:any):any', 'BoundTextAst', 'BoundTextAst.constructor(value:AST, ngContentIndex:number, sourceSpan:ParseSourceSpan)', + 'BoundTextAst.ngContentIndex:number', + 'BoundTextAst.sourceSpan:ParseSourceSpan', + 'BoundTextAst.value:AST', 'BoundTextAst.visit(visitor:TemplateAstVisitor, context:any):any', 'CompileDiDependencyMetadata', - 'CompileDiDependencyMetadata.constructor({isAttribute,isSelf,isHost,isSkipSelf,isOptional,isValue,query,viewQuery,token,value}:{isAttribute?:boolean, isSelf?:boolean, isHost?:boolean, isSkipSelf?:boolean, isOptional?:boolean, isValue?:boolean, query?:CompileQueryMetadata, viewQuery?:CompileQueryMetadata, token?:CompileTokenMetadata, value?:any})', + 'CompileDiDependencyMetadata.constructor({isAttribute,isSelf,isHost,isSkipSelf,isOptional,isValue,query,viewQuery,token,value}:{isAttribute?:boolean, isSelf?:boolean, isHost?:boolean, isSkipSelf?:boolean, isOptional?:boolean, isValue?:boolean, query?:CompileQueryMetadata, viewQuery?:CompileQueryMetadata, token?:CompileTokenMetadata, value?:any}={})', 'CompileDiDependencyMetadata.fromJson(data:{[key:string]:any}):CompileDiDependencyMetadata', 'CompileDiDependencyMetadata.isAttribute:boolean', 'CompileDiDependencyMetadata.isHost:boolean', @@ -968,8 +1124,8 @@ const COMPILER = [ 'CompileDiDependencyMetadata.viewQuery:CompileQueryMetadata', 'CompileDirectiveMetadata', 'CompileDirectiveMetadata.changeDetection:ChangeDetectionStrategy', - 'CompileDirectiveMetadata.constructor({type,isComponent,selector,exportAs,changeDetection,inputs,outputs,hostListeners,hostProperties,hostAttributes,lifecycleHooks,providers,viewProviders,queries,viewQueries,template}:{type?:CompileTypeMetadata, isComponent?:boolean, selector?:string, exportAs?:string, changeDetection?:ChangeDetectionStrategy, inputs?:{[key:string]:string}, outputs?:{[key:string]:string}, hostListeners?:{[key:string]:string}, hostProperties?:{[key:string]:string}, hostAttributes?:{[key:string]:string}, lifecycleHooks?:LifecycleHooks[], providers?:Array, viewProviders?:Array, queries?:CompileQueryMetadata[], viewQueries?:CompileQueryMetadata[], template?:CompileTemplateMetadata})', - 'CompileDirectiveMetadata.create({type,isComponent,selector,exportAs,changeDetection,inputs,outputs,host,lifecycleHooks,providers,viewProviders,queries,viewQueries,template}:{type?:CompileTypeMetadata, isComponent?:boolean, selector?:string, exportAs?:string, changeDetection?:ChangeDetectionStrategy, inputs?:string[], outputs?:string[], host?:{[key:string]:string}, lifecycleHooks?:LifecycleHooks[], providers?:Array, viewProviders?:Array, queries?:CompileQueryMetadata[], viewQueries?:CompileQueryMetadata[], template?:CompileTemplateMetadata}):CompileDirectiveMetadata', + 'CompileDirectiveMetadata.constructor({type,isComponent,selector,exportAs,changeDetection,inputs,outputs,hostListeners,hostProperties,hostAttributes,lifecycleHooks,providers,viewProviders,queries,viewQueries,template}:{type?:CompileTypeMetadata, isComponent?:boolean, selector?:string, exportAs?:string, changeDetection?:ChangeDetectionStrategy, inputs?:{[key:string]:string}, outputs?:{[key:string]:string}, hostListeners?:{[key:string]:string}, hostProperties?:{[key:string]:string}, hostAttributes?:{[key:string]:string}, lifecycleHooks?:LifecycleHooks[], providers?:Array, viewProviders?:Array, queries?:CompileQueryMetadata[], viewQueries?:CompileQueryMetadata[], template?:CompileTemplateMetadata}={})', + 'CompileDirectiveMetadata.create({type,isComponent,selector,exportAs,changeDetection,inputs,outputs,host,lifecycleHooks,providers,viewProviders,queries,viewQueries,template}:{type?:CompileTypeMetadata, isComponent?:boolean, selector?:string, exportAs?:string, changeDetection?:ChangeDetectionStrategy, inputs?:string[], outputs?:string[], host?:{[key:string]:string}, lifecycleHooks?:LifecycleHooks[], providers?:Array, viewProviders?:Array, queries?:CompileQueryMetadata[], viewQueries?:CompileQueryMetadata[], template?:CompileTemplateMetadata}={}):CompileDirectiveMetadata', 'CompileDirectiveMetadata.exportAs:string', 'CompileDirectiveMetadata.fromJson(data:{[key:string]:any}):CompileDirectiveMetadata', 'CompileDirectiveMetadata.hostAttributes:{[key:string]:string}', @@ -1000,7 +1156,7 @@ const COMPILER = [ 'CompileFactoryMetadata.toJson():{[key:string]:any}', 'CompileFactoryMetadata.value:any', 'CompileIdentifierMetadata', - 'CompileIdentifierMetadata.constructor({runtime,name,moduleUrl,prefix,value}:{runtime?:any, name?:string, moduleUrl?:string, prefix?:string, value?:any})', + 'CompileIdentifierMetadata.constructor({runtime,name,moduleUrl,prefix,value}:{runtime?:any, name?:string, moduleUrl?:string, prefix?:string, value?:any}={})', 'CompileIdentifierMetadata.fromJson(data:{[key:string]:any}):CompileIdentifierMetadata', 'CompileIdentifierMetadata.identifier:CompileIdentifierMetadata', 'CompileIdentifierMetadata.moduleUrl:string', @@ -1017,7 +1173,7 @@ const COMPILER = [ 'CompileMetadataWithType.toJson():{[key:string]:any}', 'CompileMetadataWithType.type:CompileTypeMetadata', 'CompilePipeMetadata', - 'CompilePipeMetadata.constructor({type,name,pure,lifecycleHooks}:{type?:CompileTypeMetadata, name?:string, pure?:boolean, lifecycleHooks?:LifecycleHooks[]})', + 'CompilePipeMetadata.constructor({type,name,pure,lifecycleHooks}:{type?:CompileTypeMetadata, name?:string, pure?:boolean, lifecycleHooks?:LifecycleHooks[]}={})', 'CompilePipeMetadata.fromJson(data:{[key:string]:any}):CompilePipeMetadata', 'CompilePipeMetadata.identifier:CompileIdentifierMetadata', 'CompilePipeMetadata.lifecycleHooks:LifecycleHooks[]', @@ -1037,7 +1193,7 @@ const COMPILER = [ 'CompileProviderMetadata.useFactory:CompileFactoryMetadata', 'CompileProviderMetadata.useValue:any', 'CompileQueryMetadata', - 'CompileQueryMetadata.constructor({selectors,descendants,first,propertyName,read}:{selectors?:Array, descendants?:boolean, first?:boolean, propertyName?:string, read?:CompileTokenMetadata})', + 'CompileQueryMetadata.constructor({selectors,descendants,first,propertyName,read}:{selectors?:Array, descendants?:boolean, first?:boolean, propertyName?:string, read?:CompileTokenMetadata}={})', 'CompileQueryMetadata.descendants:boolean', 'CompileQueryMetadata.first:boolean', 'CompileQueryMetadata.fromJson(data:{[key:string]:any}):CompileQueryMetadata', @@ -1045,19 +1201,14 @@ const COMPILER = [ 'CompileQueryMetadata.read:CompileTokenMetadata', 'CompileQueryMetadata.selectors:Array', 'CompileQueryMetadata.toJson():{[key:string]:any}', - 'CompilerConfig', - 'CompilerConfig.constructor(genDebugInfo:boolean, logBindingUpdate:boolean, useJit:boolean, renderTypes:RenderTypes, interpolateRegexp:RegExp, defaultEncapsulation:ViewEncapsulation)', - 'CompilerConfig.renderTypes:RenderTypes', - 'CompilerConfig.interpolateRegexp:RegExp', - 'CompilerConfig.defaultEncapsulation:ViewEncapsulation', 'CompileTemplateMetadata', 'CompileTemplateMetadata.animations:CompileAnimationEntryMetadata[]', - 'CompileTemplateMetadata.constructor({encapsulation,template,templateUrl,styles,styleUrls,animations,ngContentSelectors}:{encapsulation?:ViewEncapsulation, template?:string, templateUrl?:string, styles?:string[], styleUrls?:string[], ngContentSelectors?:string[], animations?:CompileAnimationEntryMetadata[]})', + 'CompileTemplateMetadata.constructor({encapsulation,template,templateUrl,styles,styleUrls,animations,ngContentSelectors}:{encapsulation?:ViewEncapsulation, template?:string, templateUrl?:string, styles?:string[], styleUrls?:string[], ngContentSelectors?:string[], animations?:CompileAnimationEntryMetadata[]}={})', 'CompileTemplateMetadata.encapsulation:ViewEncapsulation', 'CompileTemplateMetadata.fromJson(data:{[key:string]:any}):CompileTemplateMetadata', 'CompileTemplateMetadata.ngContentSelectors:string[]', - 'CompileTemplateMetadata.styles:string[]', 'CompileTemplateMetadata.styleUrls:string[]', + 'CompileTemplateMetadata.styles:string[]', 'CompileTemplateMetadata.template:string', 'CompileTemplateMetadata.templateUrl:string', 'CompileTemplateMetadata.toJson():{[key:string]:any}', @@ -1073,7 +1224,7 @@ const COMPILER = [ 'CompileTokenMetadata.toJson():{[key:string]:any}', 'CompileTokenMetadata.value:any', 'CompileTypeMetadata', - 'CompileTypeMetadata.constructor({runtime,name,moduleUrl,prefix,isHost,value,diDeps}:{runtime?:Type, name?:string, moduleUrl?:string, prefix?:string, isHost?:boolean, value?:any, diDeps?:CompileDiDependencyMetadata[]})', + 'CompileTypeMetadata.constructor({runtime,name,moduleUrl,prefix,isHost,value,diDeps}:{runtime?:Type, name?:string, moduleUrl?:string, prefix?:string, isHost?:boolean, value?:any, diDeps?:CompileDiDependencyMetadata[]}={})', 'CompileTypeMetadata.diDeps:CompileDiDependencyMetadata[]', 'CompileTypeMetadata.fromJson(data:{[key:string]:any}):CompileTypeMetadata', 'CompileTypeMetadata.identifier:CompileIdentifierMetadata', @@ -1085,37 +1236,74 @@ const COMPILER = [ 'CompileTypeMetadata.toJson():{[key:string]:any}', 'CompileTypeMetadata.type:CompileTypeMetadata', 'CompileTypeMetadata.value:any', - 'const COMPILER_PROVIDERS:Array', - 'const TEMPLATE_TRANSFORMS:any', - 'createOfflineCompileUrlResolver():UrlResolver', + 'CompilerConfig', + 'CompilerConfig.constructor(genDebugInfo:boolean, logBindingUpdate:boolean, useJit:boolean, renderTypes:RenderTypes=null, interpolateRegexp:RegExp=null, defaultEncapsulation:ViewEncapsulation=null)', + 'CompilerConfig.defaultEncapsulation:ViewEncapsulation', + 'CompilerConfig.genDebugInfo:boolean', + 'CompilerConfig.interpolateRegexp:RegExp', + 'CompilerConfig.logBindingUpdate:boolean', + 'CompilerConfig.renderTypes:RenderTypes', + 'CompilerConfig.useJit:boolean', 'DirectiveAst', 'DirectiveAst.constructor(directive:CompileDirectiveMetadata, inputs:BoundDirectivePropertyAst[], hostProperties:BoundElementPropertyAst[], hostEvents:BoundEventAst[], sourceSpan:ParseSourceSpan)', + 'DirectiveAst.directive:CompileDirectiveMetadata', + 'DirectiveAst.hostEvents:BoundEventAst[]', + 'DirectiveAst.hostProperties:BoundElementPropertyAst[]', + 'DirectiveAst.inputs:BoundDirectivePropertyAst[]', + 'DirectiveAst.sourceSpan:ParseSourceSpan', 'DirectiveAst.visit(visitor:TemplateAstVisitor, context:any):any', 'DirectiveResolver', - 'DirectiveResolver.constructor(_reflector:ReflectorReader)', + 'DirectiveResolver.constructor(_reflector?:ReflectorReader)', 'DirectiveResolver.resolve(type:Type):DirectiveMetadata', 'ElementAst', + 'ElementAst.attrs:AttrAst[]', + 'ElementAst.children:TemplateAst[]', 'ElementAst.constructor(name:string, attrs:AttrAst[], inputs:BoundElementPropertyAst[], outputs:BoundEventAst[], references:ReferenceAst[], directives:DirectiveAst[], providers:ProviderAst[], hasViewContainer:boolean, children:TemplateAst[], ngContentIndex:number, sourceSpan:ParseSourceSpan)', + 'ElementAst.directives:DirectiveAst[]', + 'ElementAst.hasViewContainer:boolean', + 'ElementAst.inputs:BoundElementPropertyAst[]', + 'ElementAst.name:string', + 'ElementAst.ngContentIndex:number', + 'ElementAst.outputs:BoundEventAst[]', + 'ElementAst.providers:ProviderAst[]', + 'ElementAst.references:ReferenceAst[]', + 'ElementAst.sourceSpan:ParseSourceSpan', 'ElementAst.visit(visitor:TemplateAstVisitor, context:any):any', 'ElementSchemaRegistry', 'ElementSchemaRegistry.getMappedPropName(propName:string):string', 'ElementSchemaRegistry.hasProperty(tagName:string, propName:string):boolean', 'ElementSchemaRegistry.securityContext(tagName:string, propName:string):any', 'EmbeddedTemplateAst', + 'EmbeddedTemplateAst.attrs:AttrAst[]', + 'EmbeddedTemplateAst.children:TemplateAst[]', 'EmbeddedTemplateAst.constructor(attrs:AttrAst[], outputs:BoundEventAst[], references:ReferenceAst[], variables:VariableAst[], directives:DirectiveAst[], providers:ProviderAst[], hasViewContainer:boolean, children:TemplateAst[], ngContentIndex:number, sourceSpan:ParseSourceSpan)', + 'EmbeddedTemplateAst.directives:DirectiveAst[]', + 'EmbeddedTemplateAst.hasViewContainer:boolean', + 'EmbeddedTemplateAst.ngContentIndex:number', + 'EmbeddedTemplateAst.outputs:BoundEventAst[]', + 'EmbeddedTemplateAst.providers:ProviderAst[]', + 'EmbeddedTemplateAst.references:ReferenceAst[]', + 'EmbeddedTemplateAst.sourceSpan:ParseSourceSpan', + 'EmbeddedTemplateAst.variables:VariableAst[]', 'EmbeddedTemplateAst.visit(visitor:TemplateAstVisitor, context:any):any', 'NgContentAst', 'NgContentAst.constructor(index:number, ngContentIndex:number, sourceSpan:ParseSourceSpan)', + 'NgContentAst.index:number', + 'NgContentAst.ngContentIndex:number', + 'NgContentAst.sourceSpan:ParseSourceSpan', 'NgContentAst.visit(visitor:TemplateAstVisitor, context:any):any', 'NormalizedComponentWithViewDirectives', + 'NormalizedComponentWithViewDirectives.component:CompileDirectiveMetadata', 'NormalizedComponentWithViewDirectives.constructor(component:CompileDirectiveMetadata, directives:CompileDirectiveMetadata[], pipes:CompilePipeMetadata[])', + 'NormalizedComponentWithViewDirectives.directives:CompileDirectiveMetadata[]', + 'NormalizedComponentWithViewDirectives.pipes:CompilePipeMetadata[]', 'OfflineCompiler', 'OfflineCompiler.compileTemplates(components:NormalizedComponentWithViewDirectives[]):SourceModule', 'OfflineCompiler.constructor(_directiveNormalizer:DirectiveNormalizer, _templateParser:TemplateParser, _styleCompiler:StyleCompiler, _viewCompiler:ViewCompiler, _outputEmitter:OutputEmitter, _xhr:XHR)', 'OfflineCompiler.loadAndCompileStylesheet(stylesheetUrl:string, shim:boolean, suffix:string):Promise', 'OfflineCompiler.normalizeDirectiveMetadata(directive:CompileDirectiveMetadata):Promise', 'PipeResolver', - 'PipeResolver.constructor(_reflector:ReflectorReader)', + 'PipeResolver.constructor(_reflector?:ReflectorReader)', 'PipeResolver.resolve(type:Type):PipeMetadata', 'PropertyBindingType', 'PropertyBindingType.Animation', @@ -1125,6 +1313,12 @@ const COMPILER = [ 'PropertyBindingType.Style', 'ProviderAst', 'ProviderAst.constructor(token:CompileTokenMetadata, multiProvider:boolean, eager:boolean, providers:CompileProviderMetadata[], providerType:ProviderAstType, sourceSpan:ParseSourceSpan)', + 'ProviderAst.eager:boolean', + 'ProviderAst.multiProvider:boolean', + 'ProviderAst.providerType:ProviderAstType', + 'ProviderAst.providers:CompileProviderMetadata[]', + 'ProviderAst.sourceSpan:ParseSourceSpan', + 'ProviderAst.token:CompileTokenMetadata', 'ProviderAst.visit(visitor:TemplateAstVisitor, context:any):any', 'ProviderAstType', 'ProviderAstType.Builtin', @@ -1134,20 +1328,25 @@ const COMPILER = [ 'ProviderAstType.PublicService', 'ReferenceAst', 'ReferenceAst.constructor(name:string, value:CompileTokenMetadata, sourceSpan:ParseSourceSpan)', + 'ReferenceAst.name:string', + 'ReferenceAst.sourceSpan:ParseSourceSpan', + 'ReferenceAst.value:CompileTokenMetadata', 'ReferenceAst.visit(visitor:TemplateAstVisitor, context:any):any', 'RenderTypes', 'RenderTypes.renderComment:CompileIdentifierMetadata', 'RenderTypes.renderElement:CompileIdentifierMetadata', - 'RenderTypes.renderer:CompileIdentifierMetadata', 'RenderTypes.renderEvent:CompileIdentifierMetadata', 'RenderTypes.renderNode:CompileIdentifierMetadata', 'RenderTypes.renderText:CompileIdentifierMetadata', + 'RenderTypes.renderer:CompileIdentifierMetadata', 'RuntimeCompiler', 'RuntimeCompiler.clearCache():any', 'RuntimeCompiler.constructor(_metadataResolver:CompileMetadataResolver, _templateNormalizer:DirectiveNormalizer, _templateParser:TemplateParser, _styleCompiler:StyleCompiler, _viewCompiler:ViewCompiler, _xhr:XHR, _genConfig:CompilerConfig)', 'RuntimeCompiler.resolveComponent(component:Type|string):Promise>', 'SourceModule', 'SourceModule.constructor(moduleUrl:string, source:string)', + 'SourceModule.moduleUrl:string', + 'SourceModule.source:string', 'TemplateAst', 'TemplateAst.sourceSpan:ParseSourceSpan', 'TemplateAst.visit(visitor:TemplateAstVisitor, context:any):any', @@ -1164,32 +1363,85 @@ const COMPILER = [ 'TemplateAstVisitor.visitReference(ast:ReferenceAst, context:any):any', 'TemplateAstVisitor.visitText(ast:TextAst, context:any):any', 'TemplateAstVisitor.visitVariable(ast:VariableAst, context:any):any', - 'templateVisitAll(visitor:TemplateAstVisitor, asts:TemplateAst[], context:any):any[]', 'TextAst', 'TextAst.constructor(value:string, ngContentIndex:number, sourceSpan:ParseSourceSpan)', + 'TextAst.ngContentIndex:number', + 'TextAst.sourceSpan:ParseSourceSpan', + 'TextAst.value:string', 'TextAst.visit(visitor:TemplateAstVisitor, context:any):any', 'UrlResolver', - 'UrlResolver.constructor(_packagePrefix:string)', + 'UrlResolver.constructor(_packagePrefix:string=null)', 'UrlResolver.resolve(baseUrl:string, url:string):string', - 'var DEFAULT_PACKAGE_URL_PROVIDER:any', 'VariableAst', 'VariableAst.constructor(name:string, value:string, sourceSpan:ParseSourceSpan)', + 'VariableAst.name:string', + 'VariableAst.sourceSpan:ParseSourceSpan', + 'VariableAst.value:string', 'VariableAst.visit(visitor:TemplateAstVisitor, context:any):any', 'ViewResolver', - 'ViewResolver.constructor(_reflector:ReflectorReader)', + 'ViewResolver.constructor(_reflector?:ReflectorReader)', 'ViewResolver.resolve(component:Type):ViewMetadata', 'XHR', 'XHR.get(url:string):Promise', + 'const COMPILER_PROVIDERS:Array', + 'const TEMPLATE_TRANSFORMS:any', + 'createOfflineCompileUrlResolver():UrlResolver', + 'templateVisitAll(visitor:TemplateAstVisitor, asts:TemplateAst[], context:any=null):any[]', + 'var DEFAULT_PACKAGE_URL_PROVIDER:any', +]; + +const COMPILER_TESTING = [ + 'ComponentFixture.autoDetectChanges(autoDetect:boolean=true):any', + 'ComponentFixture.changeDetectorRef:ChangeDetectorRef', 'ComponentFixture.checkNoChanges():void', + 'ComponentFixture.componentInstance:any', 'ComponentFixture.componentRef:ComponentRef', + 'ComponentFixture.constructor(componentRef:ComponentRef, ngZone:NgZone, autoDetect:boolean)', + 'ComponentFixture.debugElement:DebugElement', 'ComponentFixture.destroy():void', + 'ComponentFixture.detectChanges(checkNoChanges:boolean=true):void', + 'ComponentFixture.elementRef:ElementRef', 'ComponentFixture.isStable():boolean', + 'ComponentFixture.nativeElement:any', 'ComponentFixture.ngZone:NgZone', + 'ComponentFixture.whenStable():Promise', 'ComponentFixture', 'MockDirectiveResolver', + 'MockDirectiveResolver.resolve(type:Type):DirectiveMetadata', + 'MockDirectiveResolver.setProvidersOverride(type:Type, providers:any[]):void', + 'MockDirectiveResolver.setViewProvidersOverride(type:Type, viewProviders:any[]):void', + 'MockSchemaRegistry', 'MockSchemaRegistry.attrPropMapping:{[key:string]:string}', + 'MockSchemaRegistry.constructor(existingProperties:{[key:string]:boolean}, attrPropMapping:{[key:string]:string})', + 'MockSchemaRegistry.existingProperties:{[key:string]:boolean}', + 'MockSchemaRegistry.getMappedPropName(attrName:string):string', + 'MockSchemaRegistry.hasProperty(tagName:string, property:string):boolean', + 'MockSchemaRegistry.securityContext(tagName:string, property:string):SecurityContext', + 'MockViewResolver', 'MockViewResolver.constructor()', + 'MockViewResolver.overrideViewDirective(component:Type, from:Type, to:Type):void', + 'MockViewResolver.resolve(component:Type):ViewMetadata', + 'MockViewResolver.setAnimations(component:Type, animations:AnimationEntryMetadata[]):void', + 'MockViewResolver.setInlineTemplate(component:Type, template:string):void', + 'MockViewResolver.setView(component:Type, view:ViewMetadata):void', 'MockXHR', + 'MockXHR.expect(url:string, response:string):any', 'MockXHR.flush():any', + 'MockXHR.get(url:string):Promise', 'MockXHR.verifyNoOutstandingExpectations():any', + 'MockXHR.when(url:string, response:string):any', 'TestComponentBuilder', + 'TestComponentBuilder.constructor(_injector:Injector)', + 'TestComponentBuilder.createAsync(rootComponentType:Type):Promise>', + 'TestComponentBuilder.createFakeAsync(rootComponentType:Type):ComponentFixture', + 'TestComponentBuilder.createSync(componentFactory:ComponentFactory):ComponentFixture', + 'TestComponentBuilder.overrideAnimations(componentType:Type, animations:AnimationEntryMetadata[]):TestComponentBuilder', + 'TestComponentBuilder.overrideBindings(type:Type, providers:any[]):TestComponentBuilder', + 'TestComponentBuilder.overrideDirective(componentType:Type, from:Type, to:Type):TestComponentBuilder', + 'TestComponentBuilder.overrideProviders(type:Type, providers:any[]):TestComponentBuilder', + 'TestComponentBuilder.overrideTemplate(componentType:Type, template:string):TestComponentBuilder', + 'TestComponentBuilder.overrideView(componentType:Type, view:ViewMetadata):TestComponentBuilder', + 'TestComponentBuilder.overrideViewBindings(type:Type, providers:any[]):TestComponentBuilder', + 'TestComponentBuilder.overrideViewProviders(type:Type, providers:any[]):TestComponentBuilder', + 'TestComponentRenderer', 'TestComponentRenderer.insertRootElement(rootElementId:string):any', + 'var ComponentFixtureAutoDetect:any', 'var ComponentFixtureNoNgZone:any' ]; const UPGRADE = [ 'UpgradeAdapter', 'UpgradeAdapter.addProvider(provider:Type|Provider|any[]):void', - 'UpgradeAdapter.bootstrap(element:Element, modules:any[], config:IAngularBootstrapConfig):UpgradeAdapterRef', + 'UpgradeAdapter.bootstrap(element:Element, modules?:any[], config?:IAngularBootstrapConfig):UpgradeAdapterRef', 'UpgradeAdapter.downgradeNg2Component(type:Type):Function', 'UpgradeAdapter.downgradeNg2Provider(token:any):Function', 'UpgradeAdapter.upgradeNg1Component(name:string):Type', - 'UpgradeAdapter.upgradeNg1Provider(name:string, options:{asToken:any}):any', + 'UpgradeAdapter.upgradeNg1Provider(name:string, options?:{asToken:any}):any', 'UpgradeAdapterRef', 'UpgradeAdapterRef.dispose():any', 'UpgradeAdapterRef.ng1Injector:IInjectorService', @@ -1200,10 +1452,6 @@ const UPGRADE = [ ]; const PLATFORM_BROWSER = [ - 'bootstrap(appComponentType:Type, customProviders:Array):Promise>', - 'bootstrapApp(appComponentType:Type, customProviders:Array):Promise>', - 'bootstrapRender(workerScriptUri:string, customProviders:Array):Promise', - 'browserPlatform():PlatformRef', 'BrowserPlatformLocation', 'BrowserPlatformLocation.back():void', 'BrowserPlatformLocation.constructor()', @@ -1225,27 +1473,7 @@ const PLATFORM_BROWSER = [ 'ClientMessageBroker', 'ClientMessageBroker.runOnService(args:UiArguments, returnType:Type):Promise', 'ClientMessageBrokerFactory', - 'ClientMessageBrokerFactory.createMessageBroker(channel:string, runInZone:boolean):ClientMessageBroker', - 'const BROWSER_APP_COMPILER_PROVIDERS:Array', - 'const BROWSER_APP_PROVIDERS:Array', - 'const BROWSER_PLATFORM_PROVIDERS:Array', - 'const BROWSER_PROVIDERS:any[]', - 'const BROWSER_SANITIZATION_PROVIDERS:Array', - 'const CACHED_TEMPLATE_PROVIDER:Array', - 'const DOCUMENT:OpaqueToken', - 'const ELEMENT_PROBE_PROVIDERS:any[]', - 'const EVENT_MANAGER_PLUGINS:OpaqueToken', - 'const HAMMER_GESTURE_CONFIG:OpaqueToken', - 'const PRIMITIVE:Type', - 'const WORKER_APP_APPLICATION_PROVIDERS:Array', - 'const WORKER_APP_LOCATION_PROVIDERS:any', - 'const WORKER_APP_PLATFORM_PROVIDERS:Array', - 'const WORKER_RENDER_APPLICATION_PROVIDERS:Array', - 'const WORKER_RENDER_LOCATION_PROVIDERS:any', - 'const WORKER_RENDER_PLATFORM_PROVIDERS:Array', - 'const WORKER_RENDER_STARTABLE_MESSAGING_SERVICE:any', - 'const WORKER_SCRIPT:OpaqueToken', - 'disableDebugTools():void', + 'ClientMessageBrokerFactory.createMessageBroker(channel:string, runInZone?:boolean):ClientMessageBroker', 'DomEventsPlugin', 'DomEventsPlugin.addEventListener(element:HTMLElement, eventName:string, handler:Function):Function', 'DomEventsPlugin.addGlobalEventListener(target:string, eventName:string, handler:Function):Function', @@ -1257,7 +1485,6 @@ const PLATFORM_BROWSER = [ 'DomSanitizationService.bypassSecurityTrustStyle(value:string):SafeStyle', 'DomSanitizationService.bypassSecurityTrustUrl(value:string):SafeUrl', 'DomSanitizationService.sanitize(context:SecurityContext, value:any):string', - 'enableDebugTools(ref:ComponentRef):ComponentRef', 'EventManager', 'EventManager.addEventListener(element:HTMLElement, eventName:string, handler:Function):Function', 'EventManager.addGlobalEventListener(target:string, eventName:string, handler:Function):Function', @@ -1265,11 +1492,12 @@ const PLATFORM_BROWSER = [ 'EventManager.getZone():NgZone', 'FnArg', 'FnArg.constructor(value:any, type:Type)', + 'FnArg.type:Type', + 'FnArg.value:any', 'HammerGestureConfig', 'HammerGestureConfig.buildHammer(element:HTMLElement):HammerInstance', 'HammerGestureConfig.events:string[]', 'HammerGestureConfig.overrides:{[key:string]:Object}', - 'initializeGenericWorkerRenderer(injector:Injector):any', 'KeyEventsPlugin', 'KeyEventsPlugin.addEventListener(element:HTMLElement, eventName:string, handler:Function):Function', 'KeyEventsPlugin.constructor()', @@ -1280,7 +1508,7 @@ const PLATFORM_BROWSER = [ 'MessageBus', 'MessageBus.attachToZone(zone:NgZone):void', 'MessageBus.from(channel:string):EventEmitter', - 'MessageBus.initChannel(channel:string, runInZone:boolean):void', + 'MessageBus.initChannel(channel:string, runInZone?:boolean):void', 'MessageBus.to(channel:string):EventEmitter', 'MessageBusSink', 'MessageBusSink.attachToZone(zone:NgZone):void', @@ -1302,29 +1530,339 @@ const PLATFORM_BROWSER = [ 'SafeStyle', 'SafeUrl', 'ServiceMessageBroker', - 'ServiceMessageBroker.registerMethod(methodName:string, signature:Type[], method:Function, returnType:Type):void', + 'ServiceMessageBroker.registerMethod(methodName:string, signature:Type[], method:Function, returnType?:Type):void', 'ServiceMessageBrokerFactory', - 'ServiceMessageBrokerFactory.createMessageBroker(channel:string, runInZone:boolean):ServiceMessageBroker', + 'ServiceMessageBrokerFactory.createMessageBroker(channel:string, runInZone?:boolean):ServiceMessageBroker', 'Title', 'Title.getTitle():string', 'Title.setTitle(newTitle:string):any', 'UiArguments', - 'UiArguments.constructor(method:string, args:FnArg[])', - 'var SecurityContext:unknown', + 'UiArguments.args?:FnArg[]', + 'UiArguments.constructor(method:string, args?:FnArg[])', + 'UiArguments.method:string', 'WebWorkerInstance', 'WebWorkerInstance.bus:MessageBus', 'WebWorkerInstance.init(worker:Worker, bus:MessageBus):any', 'WebWorkerInstance.worker:Worker', + 'bootstrap(appComponentType:Type, customProviders?:Array):Promise>', + 'bootstrapApp(appComponentType:Type, customProviders?:Array):Promise>', + 'bootstrapRender(workerScriptUri:string, customProviders?:Array):Promise', + 'browserPlatform():PlatformRef', + 'const BROWSER_APP_COMPILER_PROVIDERS:Array', + 'const BROWSER_APP_PROVIDERS:Array', + 'const BROWSER_PLATFORM_PROVIDERS:Array', + 'const BROWSER_PROVIDERS:any[]', + 'const BROWSER_SANITIZATION_PROVIDERS:Array', + 'const CACHED_TEMPLATE_PROVIDER:Array', + 'const DOCUMENT:OpaqueToken', + 'const ELEMENT_PROBE_PROVIDERS:any[]', + 'const EVENT_MANAGER_PLUGINS:OpaqueToken', + 'const HAMMER_GESTURE_CONFIG:OpaqueToken', + 'const PRIMITIVE:Type', + 'const WORKER_APP_APPLICATION_PROVIDERS:Array', + 'const WORKER_APP_LOCATION_PROVIDERS:any', + 'const WORKER_APP_PLATFORM_PROVIDERS:Array', + 'const WORKER_RENDER_APPLICATION_PROVIDERS:Array', + 'const WORKER_RENDER_LOCATION_PROVIDERS:any', + 'const WORKER_RENDER_PLATFORM_PROVIDERS:Array', + 'const WORKER_RENDER_STARTABLE_MESSAGING_SERVICE:any', + 'const WORKER_SCRIPT:OpaqueToken', + 'disableDebugTools():void', + 'enableDebugTools(ref:ComponentRef):ComponentRef', + 'initializeGenericWorkerRenderer(injector:Injector):any', + 'var SecurityContext:unknown', 'workerAppPlatform():PlatformRef', 'workerRenderPlatform():PlatformRef', ]; -describe('public API', () => { - check('@angular/core', CORE); - check('@angular/common', COMMON); - check('@angular/compiler', COMPILER); - check('@angular/upgrade', UPGRADE); - check('@angular/platform-browser', PLATFORM_BROWSER); +const PLATFORM_BROWSER_TESTING = [ + 'BrowserDetection', + 'BrowserDetection.constructor(ua:string)', + 'BrowserDetection.isAndroid:boolean', + 'BrowserDetection.isChromeDesktop:boolean', + 'BrowserDetection.isEdge:boolean', + 'BrowserDetection.isFirefox:boolean', + 'BrowserDetection.isIE:boolean', + 'BrowserDetection.isIOS7:boolean', + 'BrowserDetection.isSlow:boolean', + 'BrowserDetection.isWebkit:boolean', + 'BrowserDetection.setup():any', + 'BrowserDetection.supportsIntlApi:boolean', + 'DOMTestComponentRenderer', + 'DOMTestComponentRenderer.constructor(_doc:any)', + 'DOMTestComponentRenderer.insertRootElement(rootElId:string):any', + 'NgMatchers', + 'NgMatchers.not:NgMatchers', + 'NgMatchers.toBeAnInstanceOf(expected:any):boolean', + 'NgMatchers.toBePromise():boolean', + 'NgMatchers.toContainError(expected:any):boolean', + 'NgMatchers.toHaveCssClass(expected:any):boolean', + 'NgMatchers.toHaveCssStyle(expected:any):boolean', + 'NgMatchers.toHaveText(expected:any):boolean', + 'NgMatchers.toImplement(expected:any):boolean', + 'NgMatchers.toMatchPattern(expectedMessage:any):boolean', + 'NgMatchers.toThrowErrorWith(expectedMessage:any):boolean', + 'const ADDITIONAL_TEST_BROWSER_PROVIDERS:any', + 'const ADDITIONAL_TEST_BROWSER_STATIC_PROVIDERS:Array', + 'const TEST_BROWSER_APPLICATION_PROVIDERS:Array', + 'const TEST_BROWSER_PLATFORM_PROVIDERS:Array', + 'const TEST_BROWSER_STATIC_APPLICATION_PROVIDERS:Array', + 'const TEST_BROWSER_STATIC_PLATFORM_PROVIDERS:Array', + 'dispatchEvent(element:any, eventType:any):void', + 'el(html:string):HTMLElement', + 'normalizeCSS(css:string):string', + 'stringifyElement(el:any):string', + 'var browserDetection:BrowserDetection', + 'var expect:(actual: any) => NgMatchers' +]; + +const PLATFORM_BROWSER_TESTING_E2E = [ + 'clickAll(buttonSelectors:any):any', + 'var $:cssSelectorHelper', + 'var browser:IBrowser', + 'verifyNoBrowserErrors():any', +]; + +const PLATFORM_SERVER = [ + 'Parse5DomAdapter', + 'Parse5DomAdapter.addClass(element:any, className:string):any', + 'Parse5DomAdapter.adoptNode(node:any):any', + 'Parse5DomAdapter.appendChild(el:any, node:any):any', + 'Parse5DomAdapter.attrToPropMap:any', + 'Parse5DomAdapter.attributeMap(element:any):Map', + 'Parse5DomAdapter.cancelAnimationFrame(id:number):any', + 'Parse5DomAdapter.childNodes(el:any):Node[]', + 'Parse5DomAdapter.childNodesAsList(el:any):any[]', + 'Parse5DomAdapter.classList(element:any):string[]', + 'Parse5DomAdapter.clearNodes(el:any):any', + 'Parse5DomAdapter.clone(node:Node):Node', + 'Parse5DomAdapter.content(node:any):string', + 'Parse5DomAdapter.createComment(text:string):Comment', + 'Parse5DomAdapter.createElement(tagName:any):HTMLElement', + 'Parse5DomAdapter.createElementNS(ns:any, tagName:any):HTMLElement', + 'Parse5DomAdapter.createEvent(eventType:string):Event', + 'Parse5DomAdapter.createHtmlDocument():Document', + 'Parse5DomAdapter.createMouseEvent(eventType:any):Event', + 'Parse5DomAdapter.createScriptTag(attrName:string, attrValue:string):HTMLElement', + 'Parse5DomAdapter.createShadowRoot(el:any):HTMLElement', + 'Parse5DomAdapter.createStyleElement(css:string):HTMLStyleElement', + 'Parse5DomAdapter.createTemplate(html:any):HTMLElement', + 'Parse5DomAdapter.createTextNode(text:string):Text', + 'Parse5DomAdapter.defaultDoc():Document', + 'Parse5DomAdapter.dispatchEvent(el:any, evt:any):any', + 'Parse5DomAdapter.elementMatches(node:any, selector:string, matcher:any=null):boolean', + 'Parse5DomAdapter.firstChild(el:any):Node', + 'Parse5DomAdapter.getAnimationPrefix():string', + 'Parse5DomAdapter.getAttribute(element:any, attribute:string):string', + 'Parse5DomAdapter.getAttributeNS(element:any, ns:string, attribute:string):string', + 'Parse5DomAdapter.getBaseHref():string', + 'Parse5DomAdapter.getBoundingClientRect(el:any):any', + 'Parse5DomAdapter.getChecked(el:any):boolean', + 'Parse5DomAdapter.getComputedStyle(el:any):any', + 'Parse5DomAdapter.getData(el:any, name:string):string', + 'Parse5DomAdapter.getDistributedNodes(el:any):Node[]', + 'Parse5DomAdapter.getElementsByClassName(element:any, name:string):HTMLElement[]', + 'Parse5DomAdapter.getElementsByTagName(element:any, name:string):HTMLElement[]', + 'Parse5DomAdapter.getEventKey(event:any):string', + 'Parse5DomAdapter.getGlobalEventTarget(target:string):any', + 'Parse5DomAdapter.getHistory():History', + 'Parse5DomAdapter.getHost(el:any):string', + 'Parse5DomAdapter.getHref(el:any):string', + 'Parse5DomAdapter.getInnerHTML(el:any):string', + 'Parse5DomAdapter.getLocation():Location', + 'Parse5DomAdapter.getOuterHTML(el:any):string', + 'Parse5DomAdapter.getProperty(el:any, name:string):any', + 'Parse5DomAdapter.getShadowRoot(el:any):Element', + 'Parse5DomAdapter.getStyle(element:any, styleName:string):string', + 'Parse5DomAdapter.getTemplateContent(el:any):Node', + 'Parse5DomAdapter.getText(el:any, isRecursive?:boolean):string', + 'Parse5DomAdapter.getTitle():string', + 'Parse5DomAdapter.getTransitionEnd():string', + 'Parse5DomAdapter.getUserAgent():string', + 'Parse5DomAdapter.getValue(el:any):string', + 'Parse5DomAdapter.getXHR():Type', + 'Parse5DomAdapter.hasAttribute(element:any, attribute:string):boolean', + 'Parse5DomAdapter.hasAttributeNS(element:any, ns:string, attribute:string):boolean', + 'Parse5DomAdapter.hasClass(element:any, className:string):boolean', + 'Parse5DomAdapter.hasProperty(element:any, name:string):boolean', + 'Parse5DomAdapter.hasShadowRoot(node:any):boolean', + 'Parse5DomAdapter.hasStyle(element:any, styleName:string, styleValue:string=null):boolean', + 'Parse5DomAdapter.importIntoDoc(node:any):any', + 'Parse5DomAdapter.insertAfter(el:any, node:any):any', + 'Parse5DomAdapter.insertAllBefore(el:any, nodes:any):any', + 'Parse5DomAdapter.insertBefore(el:any, node:any):any', + 'Parse5DomAdapter.invoke(el:Element, methodName:string, args:any[]):any', + 'Parse5DomAdapter.isCommentNode(node:any):boolean', + 'Parse5DomAdapter.isElementNode(node:any):boolean', + 'Parse5DomAdapter.isPrevented(evt:any):boolean', + 'Parse5DomAdapter.isShadowRoot(node:any):boolean', + 'Parse5DomAdapter.isTemplateElement(el:any):boolean', + 'Parse5DomAdapter.isTextNode(node:any):boolean', + 'Parse5DomAdapter.log(error:any):any', + 'Parse5DomAdapter.logError(error:any):any', + 'Parse5DomAdapter.logGroup(error:any):any', + 'Parse5DomAdapter.logGroupEnd():any', + 'Parse5DomAdapter.makeCurrent():any', + 'Parse5DomAdapter.nextSibling(el:any):Node', + 'Parse5DomAdapter.nodeName(node:any):string', + 'Parse5DomAdapter.nodeValue(node:any):string', + 'Parse5DomAdapter.on(el:any, evt:any, listener:any):any', + 'Parse5DomAdapter.onAndCancel(el:any, evt:any, listener:any):Function', + 'Parse5DomAdapter.parentElement(el:any):Node', + 'Parse5DomAdapter.parse(templateHtml:string):any', + 'Parse5DomAdapter.performanceNow():number', + 'Parse5DomAdapter.preventDefault(evt:any):any', + 'Parse5DomAdapter.query(selector:any):any', + 'Parse5DomAdapter.querySelector(el:any, selector:string):any', + 'Parse5DomAdapter.querySelectorAll(el:any, selector:string):any[]', + 'Parse5DomAdapter.remove(el:any):HTMLElement', + 'Parse5DomAdapter.removeAttribute(element:any, attribute:string):any', + 'Parse5DomAdapter.removeAttributeNS(element:any, ns:string, name:string):any', + 'Parse5DomAdapter.removeChild(el:any, node:any):any', + 'Parse5DomAdapter.removeClass(element:any, className:string):any', + 'Parse5DomAdapter.removeStyle(element:any, styleName:string):any', + 'Parse5DomAdapter.replaceChild(el:any, newNode:any, oldNode:any):any', + 'Parse5DomAdapter.requestAnimationFrame(callback:any):number', + 'Parse5DomAdapter.resetBaseElement():void', + 'Parse5DomAdapter.resolveAndSetHref(el:any, baseUrl:string, href:string):any', + 'Parse5DomAdapter.setAttribute(element:any, attribute:string, value:string):any', + 'Parse5DomAdapter.setAttributeNS(element:any, ns:string, attribute:string, value:string):any', + 'Parse5DomAdapter.setChecked(el:any, value:boolean):any', + 'Parse5DomAdapter.setData(el:any, name:string, value:string):any', + 'Parse5DomAdapter.setGlobalVar(path:string, value:any):any', + 'Parse5DomAdapter.setInnerHTML(el:any, value:any):any', + 'Parse5DomAdapter.setProperty(el:any, name:string, value:any):any', + 'Parse5DomAdapter.setStyle(element:any, styleName:string, styleValue:string):any', + 'Parse5DomAdapter.setText(el:any, value:string):any', + 'Parse5DomAdapter.setTitle(newTitle:string):any', + 'Parse5DomAdapter.setValue(el:any, value:string):any', + 'Parse5DomAdapter.supportsAnimation():boolean', + 'Parse5DomAdapter.supportsDOMEvents():boolean', + 'Parse5DomAdapter.supportsNativeShadowDOM():boolean', + 'Parse5DomAdapter.supportsWebAnimation():boolean', + 'Parse5DomAdapter.tagName(element:any):string', + 'Parse5DomAdapter.templateAwareRoot(el:any):any', + 'Parse5DomAdapter.type(node:any):string', +]; + +const PLATFORM_SERVER_TESTING = [ + 'const TEST_SERVER_APPLICATION_PROVIDERS:Array', + 'const TEST_SERVER_PLATFORM_PROVIDERS:Array', +]; + +const HTTP = [ + 'BaseRequestOptions', 'BaseRequestOptions.constructor()', 'BaseResponseOptions', + 'BaseResponseOptions.constructor()', 'BrowserXhr', 'BrowserXhr.build():any', + 'BrowserXhr.constructor()', 'Connection', 'Connection.readyState:ReadyState', + 'Connection.request:Request', 'Connection.response:any', 'ConnectionBackend', + 'ConnectionBackend.createConnection(request:any):Connection', 'Headers', + 'Headers.append(name:string, value:string):void', + 'Headers.constructor(headers?:Headers|{[key:string]:any})', 'Headers.delete(name:string):void', + 'Headers.entries():any', + 'Headers.forEach(fn:(values: string[], name: string, headers: Map) => void):void', + 'Headers.fromResponseHeaderString(headersString:string):Headers', + 'Headers.get(header:string):string', 'Headers.getAll(header:string):string[]', + 'Headers.has(header:string):boolean', 'Headers.keys():string[]', + 'Headers.set(header:string, value:string|string[]):void', 'Headers.toJSON():{[key:string]:any}', + 'Headers.values():string[][]', 'Http', 'Http._backend:ConnectionBackend //protected', + 'Http._defaultOptions:RequestOptions //protected', + 'Http.constructor(_backend:ConnectionBackend, _defaultOptions:RequestOptions)', + 'Http.delete(url:string, options?:RequestOptionsArgs):Observable', + 'Http.get(url:string, options?:RequestOptionsArgs):Observable', + 'Http.head(url:string, options?:RequestOptionsArgs):Observable', + 'Http.patch(url:string, body:any, options?:RequestOptionsArgs):Observable', + 'Http.post(url:string, body:any, options?:RequestOptionsArgs):Observable', + 'Http.put(url:string, body:any, options?:RequestOptionsArgs):Observable', + 'Http.request(url:string|Request, options?:RequestOptionsArgs):Observable', + 'JSONPBackend', 'JSONPConnection', 'JSONPConnection.finished(data?:any):void', + 'JSONPConnection.readyState:ReadyState', 'JSONPConnection.request:Request', + 'JSONPConnection.response:Observable', 'Jsonp', + 'Jsonp.constructor(backend:ConnectionBackend, defaultOptions:RequestOptions)', + 'Jsonp.request(url:string|Request, options?:RequestOptionsArgs):Observable', + 'ReadyState', 'ReadyState.Cancelled', 'ReadyState.Done', 'ReadyState.HeadersReceived', + 'ReadyState.Loading', 'ReadyState.Open', 'ReadyState.Unsent', 'Request', + 'Request.arrayBuffer():ArrayBuffer', 'Request.blob():Blob', + 'Request.constructor(requestOptions:RequestArgs)', 'Request.detectContentType():any', + 'Request.getBody():any', 'Request.headers:Headers', 'Request.json():string', + 'Request.method:RequestMethod', 'Request.text():string', 'Request.url:string', + 'Request.withCredentials:boolean', 'RequestMethod', 'RequestMethod.Delete', 'RequestMethod.Get', + 'RequestMethod.Head', 'RequestMethod.Options', 'RequestMethod.Patch', 'RequestMethod.Post', + 'RequestMethod.Put', 'RequestOptions', 'RequestOptions.body:any', + 'RequestOptions.constructor({method,headers,body,url,search,withCredentials}:RequestOptionsArgs={})', + 'RequestOptions.headers:Headers', + 'RequestOptions.merge(options?:RequestOptionsArgs):RequestOptions', + 'RequestOptions.method:RequestMethod|string', 'RequestOptions.search:URLSearchParams', + 'RequestOptions.url:string', 'RequestOptions.withCredentials:boolean', 'RequestOptionsArgs', + 'RequestOptionsArgs.body:any', 'RequestOptionsArgs.headers:Headers', + 'RequestOptionsArgs.method:string|RequestMethod', + 'RequestOptionsArgs.search:string|URLSearchParams', 'RequestOptionsArgs.url:string', + 'RequestOptionsArgs.withCredentials:boolean', 'Response', 'Response.arrayBuffer():any', + 'Response.blob():any', 'Response.bytesLoaded:number', + 'Response.constructor(responseOptions:ResponseOptions)', 'Response.headers:Headers', + 'Response.json():any', 'Response.ok:boolean', 'Response.status:number', + 'Response.statusText:string', 'Response.text():string', 'Response.totalBytes:number', + 'Response.toString():string', 'Response.type:ResponseType', 'Response.url:string', + 'ResponseOptions', 'ResponseOptions.body:string|Object', + 'ResponseOptions.constructor({body,status,headers,statusText,type,url}:ResponseOptionsArgs={})', + 'ResponseOptions.headers:Headers', + 'ResponseOptions.merge(options?:ResponseOptionsArgs):ResponseOptions', + 'ResponseOptions.status:number', 'ResponseOptions.statusText:string', + 'ResponseOptions.type:ResponseType', 'ResponseOptions.url:string', 'ResponseType', + 'ResponseType.Basic', 'ResponseType.Cors', 'ResponseType.Default', 'ResponseType.Error', + 'ResponseType.Opaque', 'URLSearchParams', 'URLSearchParams.append(param:string, val:string):void', + 'URLSearchParams.appendAll(searchParams:URLSearchParams):any', + 'URLSearchParams.clone():URLSearchParams', 'URLSearchParams.constructor(rawParams:string=\'\')', + 'URLSearchParams.delete(param:string):void', 'URLSearchParams.get(param:string):string', + 'URLSearchParams.getAll(param:string):string[]', 'URLSearchParams.has(param:string):boolean', + 'URLSearchParams.paramsMap:Map', 'URLSearchParams.rawParams:string=\'\'', + 'URLSearchParams.replaceAll(searchParams:URLSearchParams):any', + 'URLSearchParams.set(param:string, val:string):any', + 'URLSearchParams.setAll(searchParams:URLSearchParams):any', 'URLSearchParams.toString():string', + 'XHRBackend', + 'XHRBackend.constructor(_browserXHR:BrowserXhr, _baseResponseOptions:ResponseOptions)', + 'XHRBackend.createConnection(request:Request):XHRConnection', 'XHRConnection', + 'XHRConnection.constructor(req:Request, browserXHR:BrowserXhr, baseResponseOptions?:ResponseOptions)', + 'XHRConnection.readyState:ReadyState', 'XHRConnection.request:Request', + 'XHRConnection.response:Observable', + 'XHRConnection.setDetectedContentType(req:any, _xhr:any):any', 'const HTTP_BINDINGS:any', + 'const HTTP_PROVIDERS:any[]', 'const JSONP_PROVIDERS:any[]', 'const JSON_BINDINGS:any' +]; + +const HTTP_TESTING = [ + 'MockBackend', + 'MockBackend.connections:any', + 'MockBackend.connectionsArray:MockConnection[]', + 'MockBackend.constructor()', + 'MockBackend.createConnection(req:Request):MockConnection', + 'MockBackend.pendingConnections:any', + 'MockBackend.resolveAllConnections():any', + 'MockBackend.verifyNoPendingRequests():any', + 'MockConnection', + 'MockConnection.constructor(req:Request)', + 'MockConnection.mockDownload(res:Response):any', + 'MockConnection.mockError(err?:Error):any', + 'MockConnection.mockRespond(res:Response):any', + 'MockConnection.readyState:ReadyState', + 'MockConnection.request:Request', + 'MockConnection.response:ReplaySubject', +]; + + +fdescribe('public API', () => { + check('@angular/core/index.ts', CORE); + check('@angular/core/testing.ts', CORE_TESTING); + check('@angular/common/index.ts', COMMON); + check('@angular/common/testing.ts', COMMON_TESTING); + check('@angular/compiler/index.ts', COMPILER); + check('@angular/compiler/testing.ts', COMPILER_TESTING); + check('@angular/upgrade/index.ts', UPGRADE); + check('@angular/platform-browser/index.ts', PLATFORM_BROWSER); + check('@angular/platform-browser/testing.ts', PLATFORM_BROWSER_TESTING); + check('@angular/platform-browser/testing_e2e.ts', PLATFORM_BROWSER_TESTING_E2E); + check('@angular/platform-server/index.ts', PLATFORM_SERVER); + check('@angular/platform-server/testing.ts', PLATFORM_SERVER_TESTING); + check('@angular/http/index.ts', HTTP); + check('@angular/http/testing.ts', HTTP_TESTING); }); function check(file: string, expected: string[]) { @@ -1332,11 +1870,12 @@ function check(file: string, expected: string[]) { } function checkPublicApi(file: string, expected: string[]) { - const sortedActual = publicApi('modules/' + file + '/index.ts').sort(); + const sortedActual = publicApi('modules/' + file).sort(); const sortedExpected = expected.sort(); const missing = sortedActual.filter((i) => sortedExpected.indexOf(i) < 0); const extra = sortedExpected.filter((i) => sortedActual.indexOf(i) < 0); + // console.log(sortedActual.join('\',\n \'')); if (missing.length > 0) { console.log('================================================================='); console.log('=================================================================');