48 lines
1.7 KiB
Text
48 lines
1.7 KiB
Text
=== tests/cases/compiler/arrowFunctionWithObjectLiteralBody6.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
|
|
>"foo" : string
|
|
>message : string
|
|
>"bar" : 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
|
|
>"foo" : string
|
|
>message : string
|
|
>"bar" : 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
|
|
>"foo" : string
|
|
>message : string
|
|
>"bar" : 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
|
|
>"foo" : string
|
|
>message : string
|
|
>"bar" : string
|
|
|