1// @strict: true 2// @target: es2015 3 4// Repro from #31204 5 6export enum AppType { 7 HeaderDetail = 'HeaderDetail', 8 HeaderMultiDetail = 'HeaderMultiDetail', 9 AdvancedList = 'AdvancedList', 10 Standard = 'Standard', 11 Relationship = 'Relationship', 12 Report = 'Report', 13 Composite = 'Composite', 14 ListOnly = 'ListOnly', 15 ModuleSettings = 'ModuleSettings' 16} 17 18export enum AppStyle { 19 Tree, 20 TreeEntity, 21 Standard, 22 MiniApp, 23 PivotTable 24} 25 26const appTypeStylesWithError: Map<AppType, Array<AppStyle>> = new Map([ 27 [AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]], 28 [AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]], 29 [AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]] 30]); 31 32// Repro from #31204 33 34declare function foo<T>(...args: T[]): T[]; 35let b1: { x: boolean }[] = foo({ x: true }, { x: false }); 36let b2: boolean[][] = foo([true], [false]); 37