Below is Typescript code. I don't understand what is a type of params
parameter?
export class SomeService {
...
public subscribe<T>(params: { new(...args: any[]): T }): Observable<T> {
...
}
...
}
Can someone explain to me what this part means { new(...args: any[]): T }
?
UPDATE:
params
has to be Type. Here is an example
Like this: someService.subscribe(String);
or someService.subscribe(SomeClass);