2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/typeAnnotationBestCommonTypeInArrayLiteral.ts ===
|
|
|
|
interface IMenuItem {
|
|
|
|
>IMenuItem : IMenuItem
|
|
|
|
|
|
|
|
id: string;
|
|
|
|
>id : string
|
|
|
|
|
|
|
|
type: string;
|
|
|
|
>type : string
|
|
|
|
|
|
|
|
link?: string;
|
|
|
|
>link : string
|
|
|
|
|
|
|
|
classes?: string;
|
|
|
|
>classes : string
|
|
|
|
|
|
|
|
text?: string;
|
|
|
|
>text : string
|
|
|
|
|
|
|
|
icon?: string;
|
|
|
|
>icon : string
|
|
|
|
}
|
|
|
|
var menuData: IMenuItem[] = [
|
|
|
|
>menuData : IMenuItem[]
|
|
|
|
>IMenuItem : IMenuItem
|
2014-10-18 01:53:18 +02:00
|
|
|
>[ { "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" }, { "id": "productName", "type": "default", "link": "", "text": "Product Name" }] : ({ "id": string; "type": string; "link": string; "icon": string; } | { "id": string; "type": string; "link": string; "text": string; })[]
|
2014-08-15 23:33:16 +02:00
|
|
|
{
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" } : { "id": string; "type": string; "link": string; "icon": string; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
"id": "ourLogo",
|
|
|
|
"type": "image",
|
|
|
|
"link": "",
|
|
|
|
"icon": "modules/menu/logo.svg"
|
|
|
|
}, {
|
2014-08-22 03:39:46 +02:00
|
|
|
>{ "id": "productName", "type": "default", "link": "", "text": "Product Name" } : { "id": string; "type": string; "link": string; "text": string; }
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
"id": "productName",
|
|
|
|
"type": "default",
|
|
|
|
"link": "",
|
|
|
|
"text": "Product Name"
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|