fix(core): Removed depricated disposePlatform
BREAKING CHANGE: previously deprecated disposePlatform was removed; see deprecation notice for migration instructions.
This commit is contained in:
parent
156a52e390
commit
d2825077b1
|
@ -14,7 +14,7 @@
|
|||
export * from './src/metadata';
|
||||
export * from './src/util';
|
||||
export * from './src/di';
|
||||
export {createPlatform, assertPlatform, disposePlatform, getPlatform, coreBootstrap, coreLoadAndBootstrap, PlatformRef, ApplicationRef, enableProdMode, isDevMode, createPlatformFactory} from './src/application_ref';
|
||||
export {createPlatform, assertPlatform, destroyPlatform, getPlatform, coreBootstrap, coreLoadAndBootstrap, PlatformRef, ApplicationRef, enableProdMode, isDevMode, createPlatformFactory} from './src/application_ref';
|
||||
export {APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, APP_BOOTSTRAP_LISTENER} from './src/application_tokens';
|
||||
export {APP_INITIALIZER, ApplicationInitStatus} from './src/application_init';
|
||||
export * from './src/zone';
|
||||
|
|
|
@ -123,15 +123,6 @@ export function assertPlatform(requiredToken: any): PlatformRef {
|
|||
return platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispose the existing platform.
|
||||
*
|
||||
* @deprecated Use `destroyPlatform` instead
|
||||
*/
|
||||
export function disposePlatform(): void {
|
||||
destroyPlatform();
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the existing platform.
|
||||
*
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
import {XHR} from '@angular/compiler';
|
||||
import {APP_INITIALIZER, CUSTOM_ELEMENTS_SCHEMA, Component, Directive, ExceptionHandler, Inject, Input, NgModule, OnDestroy, PLATFORM_DIRECTIVES, PLATFORM_INITIALIZER, PLATFORM_PIPES, Pipe, ReflectiveInjector, createPlatform, createPlatformFactory, provide} from '@angular/core';
|
||||
import {ApplicationRef, disposePlatform} from '@angular/core/src/application_ref';
|
||||
import {ApplicationRef, destroyPlatform} from '@angular/core/src/application_ref';
|
||||
import {Console} from '@angular/core/src/console';
|
||||
import {ComponentRef} from '@angular/core/src/linker/component_factory';
|
||||
import {Testability, TestabilityRegistry} from '@angular/core/src/testability/testability';
|
||||
|
@ -121,7 +121,7 @@ export function main() {
|
|||
beforeEachProviders(() => { return [Log]; });
|
||||
|
||||
beforeEach(() => {
|
||||
disposePlatform();
|
||||
destroyPlatform();
|
||||
|
||||
fakeDoc = getDOM().createHtmlDocument();
|
||||
el = getDOM().createElement('hello-app', fakeDoc);
|
||||
|
@ -136,7 +136,7 @@ export function main() {
|
|||
[{provide: DOCUMENT, useValue: fakeDoc}, {provide: Console, useValue: compilerConsole}];
|
||||
});
|
||||
|
||||
afterEach(disposePlatform);
|
||||
afterEach(destroyPlatform);
|
||||
|
||||
it('should throw if bootstrapped Directive is not a Component', () => {
|
||||
expect(() => bootstrap(HelloRootDirectiveIsNotCmp))
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Component, disposePlatform} from '@angular/core';
|
||||
import {Component, destroyPlatform} from '@angular/core';
|
||||
import {async} from '@angular/core/testing';
|
||||
import {BROWSER_APP_PROVIDERS} from '@angular/platform-browser';
|
||||
import {BROWSER_APP_COMPILER_PROVIDERS} from '@angular/platform-browser-dynamic';
|
||||
|
@ -26,8 +26,8 @@ export function main() {
|
|||
|
||||
describe('platform-server integration', () => {
|
||||
|
||||
beforeEach(() => disposePlatform());
|
||||
afterEach(() => disposePlatform());
|
||||
beforeEach(() => destroyPlatform());
|
||||
afterEach(() => destroyPlatform());
|
||||
|
||||
it('should bootstrap', async(() => {
|
||||
var body = writeBody('<app></app>');
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Class, Component, EventEmitter, Inject, NgModule, OpaqueToken, Testability, disposePlatform} from '@angular/core';
|
||||
import {Class, Component, EventEmitter, Inject, NgModule, OpaqueToken, Testability, destroyPlatform} from '@angular/core';
|
||||
import {async} from '@angular/core/testing';
|
||||
import {AsyncTestCompleter, ddescribe, describe, expect, iit, inject, it} from '@angular/core/testing/testing_internal';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
|
@ -15,8 +15,8 @@ import * as angular from '@angular/upgrade/src/angular_js';
|
|||
|
||||
export function main() {
|
||||
describe('adapter: ng1 to ng2', () => {
|
||||
beforeEach(() => disposePlatform());
|
||||
afterEach(() => disposePlatform());
|
||||
beforeEach(() => destroyPlatform());
|
||||
afterEach(() => destroyPlatform());
|
||||
|
||||
it('should have angular 1 loaded', () => expect(angular.version.major).toBe(1));
|
||||
|
||||
|
|
|
@ -488,6 +488,9 @@ export declare class DefaultIterableDiffer implements IterableDiffer {
|
|||
toString(): string;
|
||||
}
|
||||
|
||||
/** @experimental */
|
||||
export declare function destroyPlatform(): void;
|
||||
|
||||
/** @stable */
|
||||
export declare var Directive: DirectiveMetadataFactory;
|
||||
|
||||
|
@ -532,9 +535,6 @@ export interface DirectiveMetadataType {
|
|||
selector?: string;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
export declare function disposePlatform(): void;
|
||||
|
||||
/** @stable */
|
||||
export declare abstract class DoCheck {
|
||||
abstract ngDoCheck(): void;
|
||||
|
|
Loading…
Reference in New Issue