I am currently working with angular 5 and ionic 3. I have defined an interface:
export interface IAny {
getDataSource: Observable<any>;
}
Components that implement this interface must have the following method:
getDataSource () {
return Observable.of(['Item1', 'Item2', 'Item3'] as any)
};
This method is expected to return various types of dataSources, such as a simple array of strings, an array of objects, or even a single object.
Is it feasible to achieve this functionality?