Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/e2e/lib.ts

Issue 2416003003: Update package name, update and lock clang-format and tslint versions, and format all source files … (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 export class MyClass { 1 export class MyClass {
2 private error: string = 'error'; 2 private error: string = 'error';
3 constructor(private ctorField: string) {} 3 constructor(private ctorField: string) {}
4 4
5 get field(): string { 5 get field(): string {
6 // TODO: TypeScript doesn't parse the RHS as StringKeyword so we lose 6 // TODO: TypeScript doesn't parse the RHS as StringKeyword so we lose
7 // the translation of string -> String. 7 // the translation of string -> String.
8 // We use capital S String here, even though it wouldn't run in TS. 8 // We use capital S String here, even though it wouldn't run in TS.
9 if ((<any>' world') instanceof String) { 9 if ((<any>' world') instanceof String) {
10 return this.ctorField + ' world'; 10 return this.ctorField + ' world';
11 } else { 11 } else {
12 return this.error; 12 return this.error;
13 } 13 }
14 } 14 }
15 15
16 namedParam({x = '?'}: any = {}) { return 'hello' + x; } 16 namedParam({x = '?'}: any = {}) {
17 return 'hello' + x;
18 }
17 } 19 }
18 20
19 interface Observer { 21 interface Observer {
20 update(o: Object, arg: Object); 22 update(o: Object, arg: Object);
21 } 23 }
22 24
23 export class MySubclass extends MyClass implements Observer { 25 export class MySubclass extends MyClass implements Observer {
24 constructor(ctorField: string) { super(ctorField); } 26 constructor(ctorField: string) {
25 get subclassField(): string { return this.field; } 27 super(ctorField);
26 update(o: Object, arg: Object) { this.field = arg.toString(); } 28 }
29 get subclassField(): string {
30 return this.field;
31 }
32 update(o: Object, arg: Object) {
33 this.field = arg.toString();
34 }
27 } 35 }
28 36
29 export const SOME_ARRAY = [1, 2, 3]; 37 export const SOME_ARRAY = [1, 2, 3];
30 export const someArray = SOME_ARRAY; 38 export const someArray = SOME_ARRAY;
OLDNEW
« package.json ('K') | « test/call_test.ts ('k') | test/expression_test.ts » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698