TypeScript/tests/baselines/reference/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.types
Anders Hejlsberg 5ae4b5d715
Properly preserve numeric string named properties in declaration files (#39658)
* Properly preserve names of properties with numeric literal strings

* Accept new baselines
2020-07-20 10:36:46 -07:00

30 lines
1.2 KiB
Plaintext

=== tests/cases/compiler/emitAccessExpressionOfCastedObjectLiteralExpressionInArrowFunctionES6.ts ===
(x) => ({ "1": "one", "2": "two" } as { [key: string]: string })[x];
>(x) => ({ "1": "one", "2": "two" } as { [key: string]: string })[x] : (x: any) => string
>x : any
>({ "1": "one", "2": "two" } as { [key: string]: string })[x] : string
>({ "1": "one", "2": "two" } as { [key: string]: string }) : { [key: string]: string; }
>{ "1": "one", "2": "two" } as { [key: string]: string } : { [key: string]: string; }
>{ "1": "one", "2": "two" } : { "1": string; "2": string; }
>"1" : string
>"one" : "one"
>"2" : string
>"two" : "two"
>key : string
>x : any
(x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x;
>(x) => ({ "1": "one", "2": "two" } as { [key: string]: string }).x : (x: any) => string
>x : any
>({ "1": "one", "2": "two" } as { [key: string]: string }).x : string
>({ "1": "one", "2": "two" } as { [key: string]: string }) : { [key: string]: string; }
>{ "1": "one", "2": "two" } as { [key: string]: string } : { [key: string]: string; }
>{ "1": "one", "2": "two" } : { "1": string; "2": string; }
>"1" : string
>"one" : "one"
>"2" : string
>"two" : "two"
>key : string
>x : string