2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/doNotWidenAtObjectLiteralPropertyAssignment.ts ===
|
|
|
|
interface ITestEventInterval {
|
|
|
|
>ITestEventInterval : ITestEventInterval
|
|
|
|
|
|
|
|
begin: number;
|
|
|
|
>begin : number
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IIntervalTreeNode {
|
|
|
|
>IIntervalTreeNode : IIntervalTreeNode
|
|
|
|
|
|
|
|
interval: ITestEventInterval;
|
|
|
|
>interval : ITestEventInterval
|
|
|
|
>ITestEventInterval : ITestEventInterval
|
|
|
|
|
|
|
|
children?: IIntervalTreeNode[];
|
|
|
|
>children : IIntervalTreeNode[]
|
|
|
|
>IIntervalTreeNode : IIntervalTreeNode
|
|
|
|
}
|
|
|
|
|
|
|
|
var test: IIntervalTreeNode[] = [{ interval: { begin: 0 }, children: null }]; // was error here because best common type is {}
|
|
|
|
>test : IIntervalTreeNode[]
|
|
|
|
>IIntervalTreeNode : IIntervalTreeNode
|
2014-10-13 15:56:58 +02:00
|
|
|
>[{ interval: { begin: 0 }, children: null }] : { interval: { begin: number; }; children: null; }[]
|
2014-08-15 23:33:16 +02:00
|
|
|
>{ interval: { begin: 0 }, children: null } : { interval: { begin: number; }; children: null; }
|
|
|
|
>interval : { begin: number; }
|
|
|
|
>{ begin: 0 } : { begin: number; }
|
|
|
|
>begin : number
|
2014-09-10 21:58:30 +02:00
|
|
|
>children : null
|
2014-08-15 23:33:16 +02:00
|
|
|
|