Skip to content

Commit 51712fb

Browse files
committed
Add tests
1 parent 3568beb commit 51712fb

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// @strict: true
2+
// @target: es2015
3+
4+
// Repro from #31204
5+
6+
export 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+
18+
export enum AppStyle {
19+
Tree,
20+
TreeEntity,
21+
Standard,
22+
MiniApp,
23+
PivotTable
24+
}
25+
26+
const 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+
34+
declare function foo<T>(...args: T[]): T[];
35+
let b1: { x: boolean }[] = foo({ x: true }, { x: false });
36+
let b2: boolean[][] = foo([true], [false]);

0 commit comments

Comments
 (0)