refactor(Provider): remove deprecated provider/bind API (#10652)
Closes #9751 BREAKING CHANGE: These forms of providers are no longer accepted: bind(MyClass).toFactory(...) new Provider(MyClass, toFactory: ...) We now only accept: {provider: MyClass, toFactory: ...}
This commit is contained in:
@ -6,10 +6,10 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {CompilerOptions, ComponentFactory, ComponentMetadataType, ComponentStillLoadingError, DirectiveMetadataType, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgModuleMetadataType, NgModuleRef, NgZone, OpaqueToken, PipeMetadataType, PlatformRef, Provider, ReflectiveInjector, SchemaMetadata, assertPlatform, createPlatform, getPlatform} from '../index';
|
||||
import {CompilerOptions, ComponentMetadataType, ComponentStillLoadingError, DirectiveMetadataType, Injector, ModuleWithComponentFactories, NgModule, NgModuleFactory, NgModuleMetadataType, NgModuleRef, NgZone, OpaqueToken, PipeMetadataType, PlatformRef, Provider, SchemaMetadata} from '../index';
|
||||
import {ListWrapper} from '../src/facade/collection';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {FunctionWrapper, isPresent, stringify} from '../src/facade/lang';
|
||||
import {FunctionWrapper, stringify} from '../src/facade/lang';
|
||||
import {Type} from '../src/type';
|
||||
import {AsyncTestCompleter} from './async_test_completer';
|
||||
import {ComponentFixture} from './component_fixture';
|
||||
@ -147,7 +147,7 @@ export class TestBed implements Injector {
|
||||
private _directiveOverrides: [Type<any>, MetadataOverride<DirectiveMetadataType>][] = [];
|
||||
private _pipeOverrides: [Type<any>, MetadataOverride<PipeMetadataType>][] = [];
|
||||
|
||||
private _providers: Array<Type<any>|Provider|any[]|any> = [];
|
||||
private _providers: Provider[] = [];
|
||||
private _declarations: Array<Type<any>|any[]|any> = [];
|
||||
private _imports: Array<Type<any>|any[]|any> = [];
|
||||
private _schemas: Array<SchemaMetadata|any[]> = [];
|
||||
|
@ -12,10 +12,8 @@
|
||||
* allows tests to be asynchronous by either returning a promise or using a 'done' parameter.
|
||||
*/
|
||||
|
||||
import {SchemaMetadata} from '../index';
|
||||
|
||||
import {resetFakeAsyncZone} from './fake_async';
|
||||
import {TestBed, TestModuleMetadata, getTestBed} from './test_bed';
|
||||
import {TestBed} from './test_bed';
|
||||
|
||||
declare var global: any;
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {provide} from '../index';
|
||||
import {StringMapWrapper} from '../src/facade/collection';
|
||||
import {Math, global, isFunction, isPromise} from '../src/facade/lang';
|
||||
|
||||
|
Reference in New Issue
Block a user