@@ -75,7 +75,8 @@ assertType<Array<TestDashboardItem | DashboardSectionItem<TestDashboardItem>>>(s
7575
7676narrowedDashboard . addEventListener ( 'dashboard-item-moved' , ( event ) => {
7777 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 > ) ;
7980 assertType < Array < TestDashboardItem | DashboardSectionItem < TestDashboardItem > > > ( event . detail . items ) ;
8081 assertType < DashboardSectionItem < TestDashboardItem > | undefined > ( event . detail . section ) ;
8182} ) ;
@@ -88,19 +89,22 @@ narrowedDashboard.addEventListener('dashboard-item-resized', (event) => {
8889
8990narrowedDashboard . addEventListener ( 'dashboard-item-removed' , ( event ) => {
9091 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 > ) ;
9294 assertType < Array < TestDashboardItem | DashboardSectionItem < TestDashboardItem > > > ( event . detail . items ) ;
9395} ) ;
9496
9597narrowedDashboard . addEventListener ( 'dashboard-item-selected-changed' , ( event ) => {
9698 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 > ) ;
98101 assertType < boolean > ( event . detail . value ) ;
99102} ) ;
100103
101104narrowedDashboard . addEventListener ( 'dashboard-item-move-mode-changed' , ( event ) => {
102105 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 > ) ;
104108 assertType < boolean > ( event . detail . value ) ;
105109} ) ;
106110
0 commit comments