refactor(various): remove a few lingering but unused deprecated apis (#10896)
Removes deprecated APPLICATION_COMMON_PROVIDERS, as well as some internal apis that were deprecated.
This commit is contained in:
parent
0b62b6f783
commit
beb79e75bf
|
@ -25,7 +25,7 @@ export * from './src/testability/testability';
|
||||||
export * from './src/change_detection';
|
export * from './src/change_detection';
|
||||||
export * from './src/platform_core_providers';
|
export * from './src/platform_core_providers';
|
||||||
export {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID} from './src/i18n/tokens';
|
export {TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID} from './src/i18n/tokens';
|
||||||
export {APPLICATION_COMMON_PROVIDERS, ApplicationModule} from './src/application_module';
|
export {ApplicationModule} from './src/application_module';
|
||||||
export {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './src/profile/profile';
|
export {wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, WtfScopeFn} from './src/profile/profile';
|
||||||
|
|
||||||
export {Type} from './src/type';
|
export {Type} from './src/type';
|
||||||
|
|
|
@ -24,14 +24,6 @@ export function _keyValueDiffersFactory() {
|
||||||
return defaultKeyValueDiffers;
|
return defaultKeyValueDiffers;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* A default set of providers which should be included in any Angular
|
|
||||||
* application, regardless of the platform it runs onto.
|
|
||||||
*
|
|
||||||
* @deprecated Include `ApplicationModule` instead.
|
|
||||||
*/
|
|
||||||
export const APPLICATION_COMMON_PROVIDERS: Array<Type<any>|{[k: string]: any}|any[]> = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This module includes the providers of @angular/core that are needed
|
* This module includes the providers of @angular/core that are needed
|
||||||
* to bootstrap components via `ApplicationRef`.
|
* to bootstrap components via `ApplicationRef`.
|
||||||
|
|
|
@ -249,19 +249,10 @@ export class PlatformRef_ extends PlatformRef {
|
||||||
|
|
||||||
constructor(private _injector: Injector) { super(); }
|
constructor(private _injector: Injector) { super(); }
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
registerDisposeListener(dispose: () => void): void { this.onDestroy(dispose); }
|
|
||||||
|
|
||||||
onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }
|
onDestroy(callback: () => void): void { this._destroyListeners.push(callback); }
|
||||||
|
|
||||||
get injector(): Injector { return this._injector; }
|
get injector(): Injector { return this._injector; }
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
get disposed() { return this.destroyed; }
|
|
||||||
get destroyed() { return this._destroyed; }
|
get destroyed() { return this._destroyed; }
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
|
@ -273,11 +264,6 @@ export class PlatformRef_ extends PlatformRef {
|
||||||
this._destroyed = true;
|
this._destroyed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
dispose(): void { this.destroy(); }
|
|
||||||
|
|
||||||
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>): Promise<NgModuleRef<M>> {
|
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>): Promise<NgModuleRef<M>> {
|
||||||
return this._bootstrapModuleFactoryWithZone(moduleFactory, null);
|
return this._bootstrapModuleFactoryWithZone(moduleFactory, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Copyright Google Inc. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by an MIT-style license that can be
|
|
||||||
* found in the LICENSE file at https://angular.io/license
|
|
||||||
*/
|
|
||||||
|
|
||||||
import {ApplicationRef, ComponentFactory, ComponentRef, Injectable, Injector, NgZone, Type} from '../index';
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A no-op implementation of {@link ApplicationRef}, useful for testing.
|
|
||||||
*/
|
|
||||||
@Injectable()
|
|
||||||
export class MockApplicationRef extends ApplicationRef {
|
|
||||||
registerBootstrapListener(listener: (ref: ComponentRef<any>) => void): void {}
|
|
||||||
|
|
||||||
registerDisposeListener(dispose: () => void): void {}
|
|
||||||
|
|
||||||
bootstrap<C>(componentFactory: ComponentFactory<C>): ComponentRef<C> { return null; }
|
|
||||||
|
|
||||||
get injector(): Injector { return null; };
|
|
||||||
|
|
||||||
get zone(): NgZone { return null; };
|
|
||||||
|
|
||||||
run(callback: Function): any { return null; }
|
|
||||||
|
|
||||||
waitForAsyncInitializers(): Promise<any> { return null; }
|
|
||||||
|
|
||||||
dispose(): void {}
|
|
||||||
|
|
||||||
tick(): void {}
|
|
||||||
|
|
||||||
get componentTypes(): Type<any>[] { return null; };
|
|
||||||
}
|
|
|
@ -17,7 +17,6 @@ export {MockAnimationPlayer} from './mock_animation_player';
|
||||||
export {inject} from './test_bed';
|
export {inject} from './test_bed';
|
||||||
export * from './logger';
|
export * from './logger';
|
||||||
export * from './ng_zone_mock';
|
export * from './ng_zone_mock';
|
||||||
export * from './mock_application_ref';
|
|
||||||
export * from './test_component_builder';
|
export * from './test_component_builder';
|
||||||
|
|
||||||
export var proxy: ClassDecorator = (t: any /** TODO #9100 */) => t;
|
export var proxy: ClassDecorator = (t: any /** TODO #9100 */) => t;
|
||||||
|
|
|
@ -45,9 +45,6 @@ export abstract class DomAdapter {
|
||||||
abstract logGroup(error: any /** TODO #9100 */): any /** TODO #9100 */;
|
abstract logGroup(error: any /** TODO #9100 */): any /** TODO #9100 */;
|
||||||
abstract logGroupEnd(): any /** TODO #9100 */;
|
abstract logGroupEnd(): any /** TODO #9100 */;
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
getResourceLoader(): Type<any> { return this.resourceLoaderType; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps attribute names to their corresponding property names for cases
|
* Maps attribute names to their corresponding property names for cases
|
||||||
* where attribute name doesn't match property name.
|
* where attribute name doesn't match property name.
|
||||||
|
|
|
@ -50,8 +50,6 @@ export class WorkerDomAdapter extends DomAdapter {
|
||||||
getProperty(el: Element, name: string): any { throw 'not implemented'; }
|
getProperty(el: Element, name: string): any { throw 'not implemented'; }
|
||||||
invoke(el: Element, methodName: string, args: any[]): any { throw 'not implemented'; }
|
invoke(el: Element, methodName: string, args: any[]): any { throw 'not implemented'; }
|
||||||
|
|
||||||
getResourceLoader(): Type<any> { throw 'not implemented'; }
|
|
||||||
|
|
||||||
get attrToPropMap(): {[key: string]: string} { throw 'not implemented'; }
|
get attrToPropMap(): {[key: string]: string} { throw 'not implemented'; }
|
||||||
set attrToPropMap(value: {[key: string]: string}) { throw 'not implemented'; }
|
set attrToPropMap(value: {[key: string]: string}) { throw 'not implemented'; }
|
||||||
|
|
||||||
|
|
|
@ -75,8 +75,6 @@ export class Parse5DomAdapter extends DomAdapter {
|
||||||
|
|
||||||
logGroupEnd() {}
|
logGroupEnd() {}
|
||||||
|
|
||||||
getResourceLoader(): Type<ResourceLoader> { return ResourceLoader; }
|
|
||||||
|
|
||||||
get attrToPropMap() { return _attrToPropMap; }
|
get attrToPropMap() { return _attrToPropMap; }
|
||||||
|
|
||||||
query(selector: any /** TODO #9100 */) { throw _notImplemented('query'); }
|
query(selector: any /** TODO #9100 */) { throw _notImplemented('query'); }
|
||||||
|
|
|
@ -127,11 +127,6 @@ export declare const APP_ID: any;
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare const APP_INITIALIZER: any;
|
export declare const APP_INITIALIZER: any;
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
export declare const APPLICATION_COMMON_PROVIDERS: Array<Type<any> | {
|
|
||||||
[k: string]: any;
|
|
||||||
} | any[]>;
|
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export declare class ApplicationInitStatus {
|
export declare class ApplicationInitStatus {
|
||||||
done: boolean;
|
done: boolean;
|
||||||
|
|
Loading…
Reference in New Issue