Skip to content

Commit e61d82b

Browse files
committed
refactor(core): ts’ify core
1 parent aabc898 commit e61d82b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2138
-1932
lines changed

modules/angular2/core.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Define angular core API here.
66
*/
77
export * from './src/core/annotations/visibility';
8-
export * from './src/core/compiler/interfaces';
98
export * from './src/core/annotations/view';
109
export * from './src/core/application';
1110
export * from './src/core/application_tokens';

modules/angular2/globals.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ interface Window {
2727
Reflect: any;
2828
zone: Zone;
2929
Hammer: HammerStatic;
30+
getAngularTestability: Function;
3031
}

modules/angular2/src/change_detection/change_detection.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,19 @@ export var preGeneratedProtoDetectors = {};
7777
*/
7878
export class PreGeneratedChangeDetection extends ChangeDetection {
7979
_dynamicChangeDetection: ChangeDetection;
80-
_protoChangeDetectors: any;
80+
_protoChangeDetectorFactories: StringMap<string, Function>;
8181

8282
constructor(private registry: PipeRegistry, protoChangeDetectors?) {
8383
super();
8484
this._dynamicChangeDetection = new DynamicChangeDetection(registry);
85-
this._protoChangeDetectors =
85+
this._protoChangeDetectorFactories =
8686
isPresent(protoChangeDetectors) ? protoChangeDetectors : preGeneratedProtoDetectors;
8787
}
8888

8989
createProtoChangeDetector(definition: ChangeDetectorDefinition): ProtoChangeDetector {
9090
var id = definition.id;
91-
if (StringMapWrapper.contains(this._protoChangeDetectors, id)) {
92-
return StringMapWrapper.get(this._protoChangeDetectors, id)(this.registry);
91+
if (StringMapWrapper.contains(this._protoChangeDetectorFactories, id)) {
92+
return StringMapWrapper.get(this._protoChangeDetectorFactories, id)(this.registry);
9393
}
9494
return this._dynamicChangeDetection.createProtoChangeDetector(definition);
9595
}

modules/angular2/src/core/annotations/annotations.es6 renamed to modules/angular2/src/core/annotations/annotations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
export {
77
Component as ComponentAnnotation,
88
Directive as DirectiveAnnotation,
9-
onDestroy, onChange, onAllChangesDone
9+
onDestroy,
10+
onChange,
11+
onAllChangesDone
1012
} from '../annotations_impl/annotations';

modules/angular2/src/core/annotations/decorators.es6 renamed to modules/angular2/src/core/annotations/decorators.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
ComponentAnnotation,
3-
DirectiveAnnotation
4-
} from './annotations';
1+
import {ComponentAnnotation, DirectiveAnnotation} from './annotations';
52
import {ViewAnnotation} from './view';
63
import {AncestorAnnotation, ParentAnnotation} from './visibility';
74
import {AttributeAnnotation, QueryAnnotation} from './di';
File renamed without changes.

modules/angular2/src/core/annotations/view.es6

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export {
2+
View as ViewAnnotation,
3+
} from '../annotations_impl/view';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export {
22
Ancestor as AncestorAnnotation,
33
Parent as ParentAnnotation,
4-
} from '../annotations_impl/visibility';
4+
} from '../annotations_impl/visibility';

modules/angular2/src/core/annotations_impl/annotations.js renamed to modules/angular2/src/core/annotations_impl/annotations.ts

Lines changed: 193 additions & 117 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)