in the base service class , the methods are defined with a generic parameter as such :
export abstract class BaseLoopBackApi {
...snip...
public onUpdateAll(where: any = {}, data: T): Observable<{ count: 'number' }> {
...snip...
does anyone have an idea why ? Wouldn't defining <T> on the class itself have the same effect ?
ie
export abstract class BaseLoopBackApi<T>
and then remove all the definitions on the methods ...
export abstract class BaseLoopBackApi<T> {
...snip...
public onUpdateAll(where: any = {}, data: T): Observable<{ count: 'number' }> {
...snip...
I may be missing something obvious, so I thought I'd ask
in the base service class , the methods are defined with a generic parameter as such : export abstract class BaseLoopBackApi { ...snip... public onUpdateAll(where: any = {}, data: T): Observable<{ count: 'number' }> {
...snip...
does anyone have an idea why ? Wouldn't defining
<T>
on the class itself have the same effect ?ie
and then remove all the definitions on the methods ...
I may be missing something obvious, so I thought I'd ask