X Tutup
Skip to content

Commit 2e48ecd

Browse files
committed
WIP: ts2dart
1 parent ecdac50 commit 2e48ecd

File tree

163 files changed

+535
-490
lines changed

Some content is hidden

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

163 files changed

+535
-490
lines changed

modules/@angular/core/src/profile/profile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export {WtfScopeFn} from './wtf_impl';
22

3-
import * as impl from "./wtf_impl";
3+
import * as impl from './wtf_impl';
44

55
// Change exports to const once https://github.com/angular/ts2dart/issues/150
66

modules/@angular/core/test/debug/debug_node_spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import {Directive, Component, Input} from '@angular/core/src/metadata';
2626

2727
@Injectable()
2828
class Logger {
29-
log: string[];
29+
logs: string[];
3030

31-
constructor() { this.log = []; }
31+
constructor() { this.logs = []; }
3232

33-
add(thing: string) { this.log.push(thing); }
33+
add(thing: string) { this.logs.push(thing); }
3434
}
3535

3636
@Directive({selector: '[message]', inputs: ['message']})
@@ -351,7 +351,7 @@ export function main() {
351351
.then((fixture) => {
352352
fixture.detectChanges();
353353

354-
expect(fixture.debugElement.children[0].inject(Logger).log)
354+
expect(fixture.debugElement.children[0].inject(Logger).logs)
355355
.toEqual(['parent', 'nestedparent', 'child', 'nestedchild']);
356356

357357
async.done();

modules/@angular/core/test/linker/query_integration_spec.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ export function main() {
9292

9393
var q = view.debugElement.children[0].getLocal('q');
9494

95-
expect(q.log).toEqual([["setter", "foo"], ["init", "foo"], ["check", "foo"]]);
95+
expect(q.logs).toEqual([["setter", "foo"], ["init", "foo"], ["check", "foo"]]);
9696

9797
view.debugElement.componentInstance.shouldShow = false;
9898
view.detectChanges();
9999

100-
expect(q.log).toEqual([
100+
expect(q.logs).toEqual([
101101
["setter", "foo"],
102102
["init", "foo"],
103103
["check", "foo"],
@@ -119,12 +119,12 @@ export function main() {
119119
view.detectChanges();
120120
var q = view.debugElement.children[0].getLocal('q');
121121

122-
expect(q.log).toEqual([["setter", "foo"], ["init", "foo"], ["check", "foo"]]);
122+
expect(q.logs).toEqual([["setter", "foo"], ["init", "foo"], ["check", "foo"]]);
123123

124124
q.shouldShow = false;
125125
view.detectChanges();
126126

127-
expect(q.log).toEqual([
127+
expect(q.logs).toEqual([
128128
["setter", "foo"],
129129
["init", "foo"],
130130
["check", "foo"],
@@ -148,21 +148,21 @@ export function main() {
148148
view.detectChanges();
149149
var q = view.debugElement.children[0].getLocal('q');
150150

151-
expect(q.log).toEqual([["setter", "foo"], ["init", "foo"], ["check", "foo"]]);
151+
expect(q.logs).toEqual([["setter", "foo"], ["init", "foo"], ["check", "foo"]]);
152152

153153
q.shouldShow = false;
154154
q.shouldShow2 = true;
155-
q.log = [];
155+
q.logs = [];
156156
view.detectChanges();
157157

158-
expect(q.log).toEqual([["setter", "bar"], ["check", "bar"]]);
158+
expect(q.logs).toEqual([["setter", "bar"], ["check", "bar"]]);
159159

160160
q.shouldShow = false;
161161
q.shouldShow2 = false;
162-
q.log = [];
162+
q.logs = [];
163163
view.detectChanges();
164164

165-
expect(q.log).toEqual([["setter", null], ["check", null]]);
165+
expect(q.logs).toEqual([["setter", null], ["check", null]]);
166166

167167
async.done();
168168
});
@@ -810,16 +810,16 @@ class NeedsContentChild implements AfterContentInit, AfterContentChecked {
810810
@ContentChild(TextDirective)
811811
set child(value) {
812812
this._child = value;
813-
this.log.push(['setter', isPresent(value) ? value.text : null]);
813+
this.logs.push(['setter', isPresent(value) ? value.text : null]);
814814
}
815815

816816
get child() { return this._child; }
817-
log = [];
817+
logs = [];
818818

819-
ngAfterContentInit() { this.log.push(["init", isPresent(this.child) ? this.child.text : null]); }
819+
ngAfterContentInit() { this.logs.push(["init", isPresent(this.child) ? this.child.text : null]); }
820820

821821
ngAfterContentChecked() {
822-
this.log.push(["check", isPresent(this.child) ? this.child.text : null]);
822+
this.logs.push(["check", isPresent(this.child) ? this.child.text : null]);
823823
}
824824
}
825825

@@ -839,15 +839,15 @@ class NeedsViewChild implements AfterViewInit,
839839
@ViewChild(TextDirective)
840840
set child(value) {
841841
this._child = value;
842-
this.log.push(['setter', isPresent(value) ? value.text : null]);
842+
this.logs.push(['setter', isPresent(value) ? value.text : null]);
843843
}
844844

845845
get child() { return this._child; }
846-
log = [];
846+
logs = [];
847847

848-
ngAfterViewInit() { this.log.push(["init", isPresent(this.child) ? this.child.text : null]); }
848+
ngAfterViewInit() { this.logs.push(["init", isPresent(this.child) ? this.child.text : null]); }
849849

850-
ngAfterViewChecked() { this.log.push(["check", isPresent(this.child) ? this.child.text : null]); }
850+
ngAfterViewChecked() { this.logs.push(["check", isPresent(this.child) ? this.child.text : null]); }
851851
}
852852

853853
@Directive({selector: '[dir]'})

modules/@angular/facade/facade.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export * from "./src/async";
2-
export * from "./src/base_wrapped_exception";
1+
export * from './src/async';
2+
export * from './src/base_wrapped_exception';
33
export * from './src/browser';
4-
export * from "./src/collection";
5-
export * from "./src/exception_handler";
6-
export * from "./src/exceptions";
7-
export * from "./src/intl";
8-
export * from "./src/lang";
9-
export * from "./src/math";
4+
export * from './src/collection';
5+
export * from './src/exception_handler';
6+
export * from './src/exceptions';
7+
export * from './src/intl';
8+
export * from './src/lang';
9+
export * from './src/math';

modules/@angular/facade/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./facade";

modules/@angular/manual_typings/protractor.d.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

modules/@angular/platform-browser/browser_common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import {
3131
HammerGesturesPlugin
3232
} from './src/dom/events/hammer_gestures'
3333
import {DomSharedStylesHost} from './src/dom/shared_styles_host';
34-
import {AnimationBuilder} from "./src/animate/animation_builder";
35-
import {BrowserDetails} from "./src/animate/browser_details";
34+
import {AnimationBuilder} from './src/animate/animation_builder';
35+
import {BrowserDetails} from './src/animate/browser_details';
3636

3737
export {Title} from './src/browser/title';
3838
export {BrowserDomAdapter} from './src/browser/browser_adapter';

modules/@angular/platform-browser/platform_browser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export {
2929

3030
export * from './private_export';
3131

32-
import {XHRImpl} from "./src/browser/xhr_impl";
33-
import {XHR} from '@angular/compiler';
3432
import {CachedXHR} from './src/browser/xhr_cache';
3533

3634
export const CACHED_TEMPLATE_PROVIDER: Array<any /*Type | Provider | any[]*/> =
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export '../compiler.dart';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export './platform-browser.dart' show DomAdapter, setRootDomAdapter;

0 commit comments

Comments
 (0)
X Tutup