refactor(TypeScript): Add noImplicitAny
We automatically insert explicit 'any's where needed. These need to be addressed as in #9100. Fixes #4924
This commit is contained in:
@ -24,7 +24,7 @@ export function main() {
|
||||
beforeEach(() => { bus = createConnectedMessageBus(); });
|
||||
|
||||
it("should pass messages in the same channel from sink to source",
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
const CHANNEL = "CHANNEL 1";
|
||||
const MESSAGE = "Test message";
|
||||
bus.initChannel(CHANNEL, false);
|
||||
@ -38,7 +38,7 @@ export function main() {
|
||||
ObservableWrapper.callEmit(toEmitter, MESSAGE);
|
||||
}));
|
||||
|
||||
it("should broadcast", inject([AsyncTestCompleter], (async) => {
|
||||
it("should broadcast", inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
const CHANNEL = "CHANNEL 1";
|
||||
const MESSAGE = "TESTING";
|
||||
const NUM_LISTENERS = 2;
|
||||
@ -62,7 +62,7 @@ export function main() {
|
||||
ObservableWrapper.callEmit(toEmitter, MESSAGE);
|
||||
}));
|
||||
|
||||
it("should keep channels independent", inject([AsyncTestCompleter], (async) => {
|
||||
it("should keep channels independent", inject([AsyncTestCompleter], (async: any /** TODO #9100 */) => {
|
||||
const CHANNEL_ONE = "CHANNEL 1";
|
||||
const CHANNEL_TWO = "CHANNEL 2";
|
||||
const MESSAGE_ONE = "This is a message on CHANNEL 1";
|
||||
@ -114,7 +114,7 @@ export function main() {
|
||||
it("should buffer messages and wait for the zone to exit before sending",
|
||||
withProviders(() => [{provide: NgZone, useClass: MockNgZone}])
|
||||
.inject([AsyncTestCompleter, NgZone],
|
||||
(async, zone: MockNgZone) => {
|
||||
(async: any /** TODO #9100 */, zone: MockNgZone) => {
|
||||
bus = createConnectedMessageBus();
|
||||
setup(true, zone);
|
||||
|
||||
@ -137,7 +137,7 @@ export function main() {
|
||||
500);
|
||||
|
||||
it("should send messages immediatly when run outside the zone",
|
||||
inject([AsyncTestCompleter, NgZone], (async, zone: MockNgZone) => {
|
||||
inject([AsyncTestCompleter, NgZone], (async: any /** TODO #9100 */, zone: MockNgZone) => {
|
||||
bus = createConnectedMessageBus();
|
||||
setup(false, zone);
|
||||
|
||||
|
@ -30,7 +30,7 @@ export function main() {
|
||||
beforeEachProviders(() => [Serializer, {provide: ON_WEB_WORKER, useValue: true}, RenderStore]);
|
||||
|
||||
describe("UIMessageBroker", () => {
|
||||
var messageBuses;
|
||||
var messageBuses: any /** TODO #9100 */;
|
||||
|
||||
beforeEach(() => {
|
||||
messageBuses = createPairedMessageBuses();
|
||||
@ -38,7 +38,7 @@ export function main() {
|
||||
messageBuses.worker.initChannel(CHANNEL);
|
||||
});
|
||||
it("should call registered method with correct arguments",
|
||||
inject([Serializer], (serializer) => {
|
||||
inject([Serializer], (serializer: any /** TODO #9100 */) => {
|
||||
var broker = new ServiceMessageBroker_(messageBuses.ui, serializer, CHANNEL);
|
||||
broker.registerMethod(TEST_METHOD, [PRIMITIVE, PRIMITIVE], (arg1, arg2) => {
|
||||
expect(arg1).toEqual(PASSED_ARG_1);
|
||||
@ -51,7 +51,7 @@ export function main() {
|
||||
// TODO(pkozlowski): this fails only in Edge with
|
||||
// "No provider for RenderStore! (Serializer -> RenderStore)"
|
||||
if (!browserDetection.isEdge) {
|
||||
it("should return promises to the worker", inject([Serializer], (serializer) => {
|
||||
it("should return promises to the worker", inject([Serializer], (serializer: any /** TODO #9100 */) => {
|
||||
var broker = new ServiceMessageBroker_(messageBuses.ui, serializer, CHANNEL);
|
||||
broker.registerMethod(TEST_METHOD, [PRIMITIVE], (arg1) => {
|
||||
expect(arg1).toEqual(PASSED_ARG_1);
|
||||
|
@ -51,7 +51,7 @@ export function expectBrokerCall(broker: SpyMessageBroker, methodName: string, v
|
||||
expect(args.args.length).toEqual(vals.length);
|
||||
ListWrapper.forEachWithIndex(vals, (v, i) => {expect(v).toEqual(args.args[i].value)});
|
||||
}
|
||||
var promise = null;
|
||||
var promise: any /** TODO #9100 */ = null;
|
||||
if (isPresent(handler)) {
|
||||
let givenValues = args.args.map((arg) => {arg.value});
|
||||
if (givenValues.length > 0) {
|
||||
|
Reference in New Issue
Block a user