2015-02-03 02:36:45 +01:00
|
|
|
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType3_ES6.ts ===
|
2015-01-14 21:09:46 +01:00
|
|
|
interface I {
|
2015-04-13 23:01:57 +02:00
|
|
|
>I : I, Symbol(I, Decl(computedPropertyNamesContextualType3_ES6.ts, 0, 0))
|
2015-01-14 21:09:46 +01:00
|
|
|
|
|
|
|
[s: string]: (x: string) => number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>s : string, Symbol(s, Decl(computedPropertyNamesContextualType3_ES6.ts, 1, 5))
|
|
|
|
>x : string, Symbol(x, Decl(computedPropertyNamesContextualType3_ES6.ts, 1, 18))
|
2015-01-14 21:09:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
var o: I = {
|
2015-04-13 23:01:57 +02:00
|
|
|
>o : I, Symbol(o, Decl(computedPropertyNamesContextualType3_ES6.ts, 4, 3))
|
|
|
|
>I : I, Symbol(I, Decl(computedPropertyNamesContextualType3_ES6.ts, 0, 0))
|
2015-01-15 02:09:33 +01:00
|
|
|
>{ [+"foo"](y) { return y.length; }, [+"bar"]: y => y.length} : { [x: string]: (y: string) => number; }
|
2015-01-14 21:09:46 +01:00
|
|
|
|
|
|
|
[+"foo"](y) { return y.length; },
|
|
|
|
>+"foo" : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>"foo" : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 5, 13))
|
|
|
|
>y.length : number, Symbol(String.length, Decl(lib.d.ts, 414, 19))
|
|
|
|
>y : string, Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 5, 13))
|
|
|
|
>length : number, Symbol(String.length, Decl(lib.d.ts, 414, 19))
|
2015-01-14 21:09:46 +01:00
|
|
|
|
|
|
|
[+"bar"]: y => y.length
|
|
|
|
>+"bar" : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>"bar" : string
|
2015-01-14 21:09:46 +01:00
|
|
|
>y => y.length : (y: string) => number
|
2015-04-13 23:01:57 +02:00
|
|
|
>y : string, Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 6, 13))
|
|
|
|
>y.length : number, Symbol(String.length, Decl(lib.d.ts, 414, 19))
|
|
|
|
>y : string, Symbol(y, Decl(computedPropertyNamesContextualType3_ES6.ts, 6, 13))
|
|
|
|
>length : number, Symbol(String.length, Decl(lib.d.ts, 414, 19))
|
2015-01-14 21:09:46 +01:00
|
|
|
}
|