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 {
|
|
|
|
>I : I
|
|
|
|
|
|
|
|
[s: string]: (x: string) => number;
|
|
|
|
>s : string
|
|
|
|
>x : string
|
|
|
|
}
|
|
|
|
|
|
|
|
var o: I = {
|
|
|
|
>o : I
|
|
|
|
>I : I
|
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
|
|
|
|
>y : string
|
|
|
|
>y.length : number
|
|
|
|
>y : string
|
|
|
|
>length : number
|
|
|
|
|
|
|
|
[+"bar"]: y => y.length
|
|
|
|
>+"bar" : number
|
|
|
|
>y => y.length : (y: string) => number
|
|
|
|
>y : string
|
|
|
|
>y.length : number
|
|
|
|
>y : string
|
|
|
|
>length : number
|
|
|
|
}
|