
committed by
Miško Hevery

parent
4415855683
commit
e916836261
@ -5,9 +5,9 @@ import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {NgZoneZone} from 'angular2/src/core/zone/ng_zone';
|
||||
|
||||
var _scheduler;
|
||||
var _microtasks: List<Function> = [];
|
||||
var _pendingPeriodicTimers: List<number> = [];
|
||||
var _pendingTimers: List<number> = [];
|
||||
var _microtasks: Function[] = [];
|
||||
var _pendingPeriodicTimers: number[] = [];
|
||||
var _pendingTimers: number[] = [];
|
||||
var _error = null;
|
||||
|
||||
interface FakeAsyncZone extends NgZoneZone {
|
||||
|
@ -2,7 +2,7 @@ export function getTypeOf(instance) {
|
||||
return instance.constructor;
|
||||
}
|
||||
|
||||
export function instantiateType(type: Function, params: Array<any> = []) {
|
||||
export function instantiateType(type: Function, params: any[] = []) {
|
||||
var instance = Object.create(type.prototype);
|
||||
instance.constructor.apply(instance, params);
|
||||
return instance;
|
||||
|
@ -2,7 +2,7 @@ import {Injector, bind, Injectable} from 'angular2/di';
|
||||
|
||||
import {Type, isPresent, BaseException, isBlank} from 'angular2/src/core/facade/lang';
|
||||
import {Promise} from 'angular2/src/core/facade/async';
|
||||
import {List, ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
import {ViewMetadata} from '../core/metadata';
|
||||
|
||||
|
@ -42,7 +42,7 @@ import {TestComponentBuilder} from './test_component_builder';
|
||||
|
||||
import {Injector} from 'angular2/di';
|
||||
|
||||
import {List, ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {FunctionWrapper, Type} from 'angular2/src/core/facade/lang';
|
||||
|
||||
import {AppViewPool, APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/compiler/view_pool';
|
||||
@ -156,7 +156,7 @@ function _getAppBindings() {
|
||||
];
|
||||
}
|
||||
|
||||
export function createTestInjector(bindings: List<Type | Binding | List<any>>): Injector {
|
||||
export function createTestInjector(bindings: Array<Type | Binding | any[]>): Injector {
|
||||
var rootInjector = Injector.resolveAndCreate(_getRootBindings());
|
||||
return rootInjector.resolveAndCreateChild(ListWrapper.concat(_getAppBindings(), bindings));
|
||||
}
|
||||
@ -190,15 +190,15 @@ export function createTestInjector(bindings: List<Type | Binding | List<any>>):
|
||||
* @param {Function} fn
|
||||
* @return {FunctionWithParamTokens}
|
||||
*/
|
||||
export function inject(tokens: List<any>, fn: Function): FunctionWithParamTokens {
|
||||
export function inject(tokens: any[], fn: Function): FunctionWithParamTokens {
|
||||
return new FunctionWithParamTokens(tokens, fn);
|
||||
}
|
||||
|
||||
export class FunctionWithParamTokens {
|
||||
_tokens: List<any>;
|
||||
_tokens: any[];
|
||||
_fn: Function;
|
||||
|
||||
constructor(tokens: List<any>, fn: Function) {
|
||||
constructor(tokens: any[], fn: Function) {
|
||||
this._tokens = tokens;
|
||||
this._fn = fn;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ var inIt = false;
|
||||
var testBindings;
|
||||
|
||||
class BeforeEachRunner {
|
||||
_fns: List<FunctionWithParamTokens>;
|
||||
_fns: FunctionWithParamTokens[];
|
||||
_parent: BeforeEachRunner;
|
||||
constructor(parent: BeforeEachRunner) {
|
||||
this._fns = [];
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {List, ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {DOM} from 'angular2/src/core/dom/dom_adapter';
|
||||
import {
|
||||
isPresent,
|
||||
@ -9,7 +9,7 @@ import {
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
|
||||
export class Log {
|
||||
_result: List<any>;
|
||||
_result: any[];
|
||||
|
||||
constructor() { this._result = []; }
|
||||
|
||||
|
Reference in New Issue
Block a user