@@ -75,7 +75,8 @@ assertType<Array<TestDashboardItem | DashboardSectionItem<TestDashboardItem>>>(s
75
75
76
76
narrowedDashboard . addEventListener ( 'dashboard-item-moved' , ( event ) => {
77
77
assertType < DashboardItemMovedEvent < TestDashboardItem > > ( event ) ;
78
- assertType < TestDashboardItem > ( event . detail . item ) ;
78
+ assertType < TestDashboardItem > ( event . detail . item as TestDashboardItem ) ;
79
+ assertType < DashboardSectionItem < TestDashboardItem > > ( event . detail . item as DashboardSectionItem < TestDashboardItem > ) ;
79
80
assertType < Array < TestDashboardItem | DashboardSectionItem < TestDashboardItem > > > ( event . detail . items ) ;
80
81
assertType < DashboardSectionItem < TestDashboardItem > | undefined > ( event . detail . section ) ;
81
82
} ) ;
@@ -88,19 +89,22 @@ narrowedDashboard.addEventListener('dashboard-item-resized', (event) => {
88
89
89
90
narrowedDashboard . addEventListener ( 'dashboard-item-removed' , ( event ) => {
90
91
assertType < DashboardItemRemovedEvent < TestDashboardItem > > ( event ) ;
91
- assertType < TestDashboardItem | DashboardSectionItem < TestDashboardItem > > ( event . detail . item ) ;
92
+ assertType < TestDashboardItem > ( event . detail . item as TestDashboardItem ) ;
93
+ assertType < DashboardSectionItem < TestDashboardItem > > ( event . detail . item as DashboardSectionItem < TestDashboardItem > ) ;
92
94
assertType < Array < TestDashboardItem | DashboardSectionItem < TestDashboardItem > > > ( event . detail . items ) ;
93
95
} ) ;
94
96
95
97
narrowedDashboard . addEventListener ( 'dashboard-item-selected-changed' , ( event ) => {
96
98
assertType < DashboardItemSelectedChangedEvent < TestDashboardItem > > ( event ) ;
97
- assertType < TestDashboardItem > ( event . detail . item ) ;
99
+ assertType < TestDashboardItem > ( event . detail . item as TestDashboardItem ) ;
100
+ assertType < DashboardSectionItem < TestDashboardItem > > ( event . detail . item as DashboardSectionItem < TestDashboardItem > ) ;
98
101
assertType < boolean > ( event . detail . value ) ;
99
102
} ) ;
100
103
101
104
narrowedDashboard . addEventListener ( 'dashboard-item-move-mode-changed' , ( event ) => {
102
105
assertType < DashboardItemMoveModeChangedEvent < TestDashboardItem > > ( event ) ;
103
- assertType < TestDashboardItem > ( event . detail . item ) ;
106
+ assertType < TestDashboardItem > ( event . detail . item as TestDashboardItem ) ;
107
+ assertType < DashboardSectionItem < TestDashboardItem > > ( event . detail . item as DashboardSectionItem < TestDashboardItem > ) ;
104
108
assertType < boolean > ( event . detail . value ) ;
105
109
} ) ;
106
110
0 commit comments