refactor(Type): merge Type and ConcreType<?> into Type<?> (#10616)
Closes #9729 BREAKING CHANGE: `Type` is now `Type<T>` which means that in most cases you have to use `Type<any>` in place of `Type`. We don't expect that any user applications use the `Type` type.
This commit is contained in:
@ -6,13 +6,13 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {BaseException} from '@angular/core';
|
||||
import {Type} from '@angular/core';
|
||||
import {NgZone} from '@angular/core/src/zone/ng_zone';
|
||||
import {ClientMessageBroker, ClientMessageBrokerFactory_, UiArguments} from '@angular/platform-browser/src/web_workers/shared/client_message_broker';
|
||||
import {MessageBus, MessageBusSink, MessageBusSource} from '@angular/platform-browser/src/web_workers/shared/message_bus';
|
||||
|
||||
import {ListWrapper, StringMapWrapper} from '../../../src/facade/collection';
|
||||
import {Type, isPresent} from '../../../src/facade/lang';
|
||||
import {BaseException} from '../../../src/facade/exceptions';
|
||||
import {isPresent} from '../../../src/facade/lang';
|
||||
import {SpyMessageBroker} from '../worker/spies';
|
||||
|
||||
import {MockEventEmitter} from './mock_event_emitter';
|
||||
@ -46,7 +46,7 @@ export function createPairedMessageBuses(): PairedMessageBuses {
|
||||
export function expectBrokerCall(
|
||||
broker: SpyMessageBroker, methodName: string, vals?: Array<any>,
|
||||
handler?: (..._: any[]) => Promise<any>| void): void {
|
||||
broker.spy('runOnService').andCallFake((args: UiArguments, returnType: Type) => {
|
||||
broker.spy('runOnService').andCallFake((args: UiArguments, returnType: Type<any>) => {
|
||||
expect(args.method).toEqual(methodName);
|
||||
if (isPresent(vals)) {
|
||||
expect(args.args.length).toEqual(vals.length);
|
||||
|
@ -6,12 +6,13 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {Type} from '@angular/core';
|
||||
import {AsyncTestCompleter, beforeEach, beforeEachProviders, describe, expect, inject, it} from '@angular/core/testing/testing_internal';
|
||||
import {UiArguments} from '@angular/platform-browser/src/web_workers/shared/client_message_broker';
|
||||
import {MessageBus} from '@angular/platform-browser/src/web_workers/shared/message_bus';
|
||||
import {LocationType} from '@angular/platform-browser/src/web_workers/shared/serialized_types';
|
||||
import {WebWorkerPlatformLocation} from '@angular/platform-browser/src/web_workers/worker/platform_location';
|
||||
import {Type} from '../../../src/facade/lang';
|
||||
|
||||
import {MockMessageBrokerFactory, createPairedMessageBuses, expectBrokerCall} from '../shared/web_worker_test_util';
|
||||
|
||||
import {SpyMessageBroker} from './spies';
|
||||
@ -27,7 +28,7 @@ export function main() {
|
||||
|
||||
|
||||
function createWebWorkerPlatformLocation(loc: LocationType): WebWorkerPlatformLocation {
|
||||
broker.spy('runOnService').andCallFake((args: UiArguments, returnType: Type) => {
|
||||
broker.spy('runOnService').andCallFake((args: UiArguments, returnType: Type<any>) => {
|
||||
if (args.method === 'getLocation') {
|
||||
return Promise.resolve(loc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user