41 lines
1.6 KiB
Text
41 lines
1.6 KiB
Text
|
=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody5.ts ===
|
||
|
var a = () => <Error>{ name: "foo", message: "bar" };
|
||
|
>a : () => Error
|
||
|
>() => <Error>{ name: "foo", message: "bar" } : () => Error
|
||
|
><Error>{ name: "foo", message: "bar" } : Error
|
||
|
>Error : Error
|
||
|
>{ name: "foo", message: "bar" } : { name: string; message: string; }
|
||
|
>name : string
|
||
|
>message : string
|
||
|
|
||
|
var b = () => (<Error>{ name: "foo", message: "bar" });
|
||
|
>b : () => Error
|
||
|
>() => (<Error>{ name: "foo", message: "bar" }) : () => Error
|
||
|
>(<Error>{ name: "foo", message: "bar" }) : Error
|
||
|
><Error>{ name: "foo", message: "bar" } : Error
|
||
|
>Error : Error
|
||
|
>{ name: "foo", message: "bar" } : { name: string; message: string; }
|
||
|
>name : string
|
||
|
>message : string
|
||
|
|
||
|
var c = () => ({ name: "foo", message: "bar" });
|
||
|
>c : () => { name: string; message: string; }
|
||
|
>() => ({ name: "foo", message: "bar" }) : () => { name: string; message: string; }
|
||
|
>({ name: "foo", message: "bar" }) : { name: string; message: string; }
|
||
|
>{ name: "foo", message: "bar" } : { name: string; message: string; }
|
||
|
>name : string
|
||
|
>message : string
|
||
|
|
||
|
var d = () => ((<Error>({ name: "foo", message: "bar" })));
|
||
|
>d : () => Error
|
||
|
>() => ((<Error>({ name: "foo", message: "bar" }))) : () => Error
|
||
|
>((<Error>({ name: "foo", message: "bar" }))) : Error
|
||
|
>(<Error>({ name: "foo", message: "bar" })) : Error
|
||
|
><Error>({ name: "foo", message: "bar" }) : Error
|
||
|
>Error : Error
|
||
|
>({ name: "foo", message: "bar" }) : { name: string; message: string; }
|
||
|
>{ name: "foo", message: "bar" } : { name: string; message: string; }
|
||
|
>name : string
|
||
|
>message : string
|
||
|
|