32 lines
1,021 B
Text
32 lines
1,021 B
Text
=== 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
|
|
>[{ interval: { begin: 0 }, children: null }] : { interval: { begin: number; }; children: null; }[]
|
|
>{ interval: { begin: 0 }, children: null } : { interval: { begin: number; }; children: null; }
|
|
>interval : { begin: number; }
|
|
>{ begin: 0 } : { begin: number; }
|
|
>begin : number
|
|
>0 : number
|
|
>children : null
|
|
>null : null
|
|
|