Error: node_modules/@ngrx/effects/src/concat_latest_from.d.ts:2:145 - error TS2574: A rest element type must be an array type.
export declare function concatLatestFrom<T extends Observable<unknown>[], V>(observablesFactory: (value: V) => [...T]): OperatorFunction<V, [V, ...{
[i in keyof T]: ObservedValueOf<T[i]>;
}]>;
still active community here? question about entityAdapter,
it seems like deeper object key data is overwritten completely instead of concat, what i would expect.
if this is my entity:
'93dd0fd6-fd8c-4c70-a213-cb76d1ef6eda': {
guid: '93dd0fd6-fd8c-4c70-a213-cb76d1ef6eda',
languageSettings: {
DE: {
slug: 'velows',
},
EN: {
slug: 'velows',
},
FR: {
slug: 'velows',
},
NL: {
slug: 'veluwe',
},
},
},
and i update the object with a specific language for content like
```
'93dd0fd6-fd8c-4c70-a213-cb76d1ef6eda': {
guid: '93dd0fd6-fd8c-4c70-a213-cb76d1ef6eda',
languageSettings: {
EN: {
slug: 'velows',
title: 'Testing EN',
content: 'Test',
},
},
},
How do i concat with the entityAdapter?
export const selectConnectedAccount = (state: AppState) => state.login
ngOnInit() {
this.store
.pipe(
map(state => {
console.log('mapping state header: ', state)
return selectConnectedAccount(state);
}),
filter(val => val !== undefined),
filter((val: any) => val.currentAccount !== undefined),
// distinctUntilChanged
)
.subscribe(
state => {
if (state.currentAccount) {
console.log('got new connected address: ', state)
this.connectedAddress = state.currentAccount;
// Uncommenting below line causes infinite loop of ngrx actions firing...
// this.store.dispatch(loadHydrants({ account: this.connectedAddress }))
console.log('got address, dispatching call for hydrants... ', this.connectedAddress)
}
else
console.log('got empty state: ', state)
}
)
}
export interface AppState {
login: any;
hydrants: any;
}
i'm using angular 12 + ngrx 12.2 + router-store. i have a ItemListComponent that shows a list of items and ItemDetailsComponent that shows details about one item. if i go to the list component and get the list of all items and then from there router.navigate to the Details component e.g. /itemDetails/1
everything works fine using <div *ngIf="item$ | async as item"
however, if i navigate directly to the /itemDetails/1
the item details don't show up. in my facade, i have
selectedItems$ = this.store
.pipe(select(ItemsSelectors.getSelected))
.pipe(
tap(project => {
if (!project) {
this.loadAllItems();
}
}),
filter(project => {
console.log('item: ', item);
return item !== undefined;
})
);
i can see it logging the empty item before it pulls the list and the item with data after