File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ export const dataSourceMarker = Symbol('Data Source Marker');
66/**
77 * A model which can be used to retrieve data asynchronously
88 */
9- export interface DataSource < T > {
9+ export interface DataSource < T , R = unknown > {
1010 /**
1111 * Retrieves data of type T in the form of an observable
1212 */
13- getData ( ) : Observable < T > ;
13+ getData ( request ?: R ) : Observable < T > ;
1414
1515 /**
1616 * A marker property used to determine if the implementing class is
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class DefaultModelApi implements ModelApi {
6969 /**
7070 * @inheritdoc
7171 */
72- public getData < T > ( ) : Observable < T > {
72+ public getData < T , R > ( request ?: R ) : Observable < T > {
7373 const dataSource = this . dataSourceManager . getClosest < T > ( this . model ) ;
7474
7575 if ( ! dataSource ) {
@@ -78,7 +78,7 @@ export class DefaultModelApi implements ModelApi {
7878 return EMPTY ;
7979 }
8080
81- return dataSource . getData ( ) ;
81+ return dataSource . getData ( request ) ;
8282 }
8383
8484 /**
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export interface ModelApi {
3232 * attached to)
3333 * - Else, recurse upwards to parent
3434 */
35- getData < T > ( ) : Observable < T > ;
35+ getData < T , R = unknown > ( request ?: R ) : Observable < T > ;
3636
3737 /**
3838 * Retrieves the merged theme specified for this model
You can’t perform that action at this time.
0 commit comments