refactor(ts'ify): ts’ify mocks, directives and test_lib

Also cleans up global types.
This commit is contained in:
Tobias Bosch
2015-05-20 17:19:46 -07:00
parent c5996529c3
commit aec51d616b
51 changed files with 610 additions and 671 deletions

View File

@ -1,13 +1,6 @@
import {List, Map, ListWrapper, MapWrapper} from 'angular2/src/facade/collection';
import {DOM} from 'angular2/src/dom/dom_adapter';
import {
int,
isBlank,
isPresent,
Type,
StringJoiner,
assertionsEnabled
} from 'angular2/src/facade/lang';
import {isBlank, isPresent, Type, StringJoiner, assertionsEnabled} from 'angular2/src/facade/lang';
import {ProtoViewBuilder, ElementBinderBuilder} from '../view/proto_view_builder';

View File

@ -1,5 +1,5 @@
import {Inject, Injectable} from 'angular2/di';
import {int, isPresent, isBlank, BaseException, RegExpWrapper} from 'angular2/src/facade/lang';
import {isPresent, isBlank, BaseException, RegExpWrapper} from 'angular2/src/facade/lang';
import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection';
import {DOM} from 'angular2/src/dom/dom_adapter';

View File

@ -1,3 +1,5 @@
/// <reference path="../../../../typings/hammerjs/hammerjs"/>
import {HammerGesturesPluginCommon} from './hammer_common';
import {isPresent, BaseException} from 'angular2/src/facade/lang';
@ -7,7 +9,7 @@ export class HammerGesturesPlugin extends HammerGesturesPluginCommon {
supports(eventName: string): boolean {
if (!super.supports(eventName)) return false;
if (!isPresent(window.Hammer)) {
if (!isPresent(window['Hammer'])) {
throw new BaseException(`Hammer.js is not loaded, can not bind ${eventName} event`);
}

View File

@ -7,8 +7,7 @@ import {
RegExpMatcherWrapper,
isPresent,
isBlank,
BaseException,
int
BaseException
} from 'angular2/src/facade/lang';
/**

View File

@ -1,4 +1,4 @@
import {isBlank, isPresent, int} from 'angular2/src/facade/lang';
import {isBlank, isPresent} from 'angular2/src/facade/lang';
import {MapWrapper, Map} from 'angular2/src/facade/collection';
import {DOM} from 'angular2/src/dom/dom_adapter';

View File

@ -1,7 +1,7 @@
import {DOM} from 'angular2/src/dom/dom_adapter';
import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection';
import {Locals} from 'angular2/change_detection';
import {int, isPresent, isBlank, BaseException} from 'angular2/src/facade/lang';
import {isPresent, isBlank, BaseException} from 'angular2/src/facade/lang';
import {DomViewContainer} from './view_container';
import {DomProtoView} from './proto_view';