mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Add tests
This commit is contained in:
parent
3568beb483
commit
51712fb1ae
@ -0,0 +1,36 @@
|
||||
// @strict: true
|
||||
// @target: es2015
|
||||
|
||||
// Repro from #31204
|
||||
|
||||
export enum AppType {
|
||||
HeaderDetail = 'HeaderDetail',
|
||||
HeaderMultiDetail = 'HeaderMultiDetail',
|
||||
AdvancedList = 'AdvancedList',
|
||||
Standard = 'Standard',
|
||||
Relationship = 'Relationship',
|
||||
Report = 'Report',
|
||||
Composite = 'Composite',
|
||||
ListOnly = 'ListOnly',
|
||||
ModuleSettings = 'ModuleSettings'
|
||||
}
|
||||
|
||||
export enum AppStyle {
|
||||
Tree,
|
||||
TreeEntity,
|
||||
Standard,
|
||||
MiniApp,
|
||||
PivotTable
|
||||
}
|
||||
|
||||
const appTypeStylesWithError: Map<AppType, Array<AppStyle>> = new Map([
|
||||
[AppType.Standard, [AppStyle.Standard, AppStyle.MiniApp]],
|
||||
[AppType.Relationship, [AppStyle.Standard, AppStyle.Tree, AppStyle.TreeEntity]],
|
||||
[AppType.AdvancedList, [AppStyle.Standard, AppStyle.MiniApp]]
|
||||
]);
|
||||
|
||||
// Repro from #31204
|
||||
|
||||
declare function foo<T>(...args: T[]): T[];
|
||||
let b1: { x: boolean }[] = foo({ x: true }, { x: false });
|
||||
let b2: boolean[][] = foo([true], [false]);
|
||||
Loading…
x
Reference in New Issue
Block a user