mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
1.7 KiB
Plaintext
46 lines
1.7 KiB
Plaintext
//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames48_ES6.ts] ////
|
|
|
|
=== 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, 6, 16))
|
|
>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, 10, 16))
|
|
>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]: ""
|
|
>["" || 0] : Symbol(["" || 0], Decl(computedPropertyNames48_ES6.ts, 14, 16))
|
|
|
|
}); // Should return any (widened form of undefined)
|