Odonno / ngrx-signalr-core

A library to handle realtime SignalR (.NET Core) events using @angular, rxjs and the @ngrx library
https://www.npmjs.com/package/ngrx-signalr-core
MIT License
27 stars 13 forks source link

Support deprecation of selectors with props #53

Closed labeled closed 2 years ago

labeled commented 2 years ago

See https://github.com/ngrx/platform/issues/2980

Selectors with props are deprecated and are causing build failures using Ivy compilation with strict mode in Angular. This line of code throws the following exception.

this.store.select(selectHubStatus, this.selectedAuditHub)
error TS2769: No overload matches this call.
  Overload 1 of 9, '(mapFn: (state: object, props: HubFullDefinition) => SignalRHubStatus, props: HubFullDefinition): Observable<SignalRHubStatus>', gave the following error.
    Argument of type 'MemoizedSelectorWithProps<RootState, HubKeyDefinition, SignalRHubStatus, DefaultProjectorFn<SignalRHubStatus>>' is not assignable to parameter of type '(state: object, props: HubFullDefinition) => SignalRHubStatus'.
  Overload 2 of 9, '(key1: never, key2: string | number | symbol): Observable<never>', gave the following error.
    Argument of type 'MemoizedSelectorWithProps<RootState, HubKeyDefinition, SignalRHubStatus, DefaultProjectorFn<SignalRHubStatus>>' is not assignable to parameter of type 'never'.
Odonno commented 2 years ago

Hi Travis,

Indeed, it was a major changes in the recent version of ngrx. I just published the v12.0.0 using factory selectors.

Can you try and tell me if it works as expected?