Referencing the ngrx example, we encounter the code snippet for the method store.select
, which has a complex signature with two arrows. What is the significance of this method signature?
The interface definition in the type file presents the following signature:
export interface SelectSignature<T> {
<R>(...paths: string[]): Observable<R>;
<R>(mapFn: (state: T) => R): Observable<R>;
}
https://github.com/ngrx/example-app/blob/master/src/app/containers/find-book-page.ts