Skip to content

Commit c90252c

Browse files
committed
fix(universal-app): Add ElementItem interface
1 parent d31f153 commit c90252c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/universal-app/kitchen-sink/kitchen-sink.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,15 @@ import {MatTooltipModule} from '@angular/material/tooltip';
6161
import {YouTubePlayer} from '@angular/youtube-player';
6262
import {Observable, of as observableOf} from 'rxjs';
6363

64-
export class TableDataSource extends DataSource<any> {
65-
connect(): Observable<any> {
64+
interface ElementItem {
65+
position: number;
66+
name: string;
67+
weight: number;
68+
symbol: string;
69+
}
70+
71+
export class TableDataSource extends DataSource<ElementItem> {
72+
connect(): Observable<Array<ElementItem>> {
6673
return observableOf([
6774
{position: 1, name: 'Hydrogen', weight: 1.0079, symbol: 'H'},
6875
{position: 2, name: 'Helium', weight: 4.0026, symbol: 'He'},
@@ -77,7 +84,7 @@ export class TableDataSource extends DataSource<any> {
7784
]);
7885
}
7986

80-
disconnect() {}
87+
override disconnect() {}
8188
}
8289

8390
export const AUTOMATED_KITCHEN_SINK = new InjectionToken<boolean>('AUTOMATED_KITCHEN_SINK');

0 commit comments

Comments
 (0)