39 lines
1.5 KiB
Text
39 lines
1.5 KiB
Text
=== tests/cases/conformance/es6/computedProperties/computedPropertyNames48_ES6.ts ===
|
|
declare function extractIndexer<T>(p: { [n: number]: T }): T;
|
|
>extractIndexer : Symbol(extractIndexer, Decl(computedPropertyNames48_ES6.ts, 0, 0))
|
|
>T : Symbol(T, Decl(computedPropertyNames48_ES6.ts, 0, 32))
|
|
>p : Symbol(p, Decl(computedPropertyNames48_ES6.ts, 0, 35))
|
|
>n : Symbol(n, Decl(computedPropertyNames48_ES6.ts, 0, 41))
|
|
>T : Symbol(T, Decl(computedPropertyNames48_ES6.ts, 0, 32))
|
|
>T : Symbol(T, Decl(computedPropertyNames48_ES6.ts, 0, 32))
|
|
|
|
enum E { x }
|
|
>E : Symbol(E, Decl(computedPropertyNames48_ES6.ts, 0, 61))
|
|
>x : Symbol(E.x, Decl(computedPropertyNames48_ES6.ts, 2, 8))
|
|
|
|
var a: any;
|
|
>a : Symbol(a, Decl(computedPropertyNames48_ES6.ts, 4, 3))
|
|
|
|
extractIndexer({
|
|
>extractIndexer : Symbol(extractIndexer, Decl(computedPropertyNames48_ES6.ts, 0, 0))
|
|
|
|
[a]: ""
|
|
>a : Symbol(a, Decl(computedPropertyNames48_ES6.ts, 4, 3))
|
|
|
|
}); // Should return string
|
|
|
|
extractIndexer({
|
|
>extractIndexer : Symbol(extractIndexer, Decl(computedPropertyNames48_ES6.ts, 0, 0))
|
|
|
|
[E.x]: ""
|
|
>E.x : Symbol(E.x, Decl(computedPropertyNames48_ES6.ts, 2, 8))
|
|
>E : Symbol(E, Decl(computedPropertyNames48_ES6.ts, 0, 61))
|
|
>x : Symbol(E.x, Decl(computedPropertyNames48_ES6.ts, 2, 8))
|
|
|
|
}); // Should return string
|
|
|
|
extractIndexer({
|
|
>extractIndexer : Symbol(extractIndexer, Decl(computedPropertyNames48_ES6.ts, 0, 0))
|
|
|
|
["" || 0]: ""
|
|
}); // Should return any (widened form of undefined)
|