Skip to content
This repository was archived by the owner on May 24, 2022. It is now read-only.

Commit 1b1515e

Browse files
committed
release: 4.2.0
1 parent 17917fd commit 1b1515e

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 4.2.0 2021-03-26
2+
3+
- Fix: support Angular 11.2+
4+
- Feat: add `entitiesArray`, `entitiesArray$` to `AbstractNgxsDataEntityCollectionsRepository`
5+
16
# 4.1.1 2020-09-09
27

38
- Fix: invalid expose arguments when inheritance

lib/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngxs-labs/data",
3-
"version": "4.1.1",
3+
"version": "4.2.0",
44
"license": "MIT",
55
"schematics": "./schematics/collection.json",
66
"scripts": {

lib/repositories/src/ngxs-data-entity-collections/ngxs-data-entity-collections.repository.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export abstract class AbstractNgxsDataEntityCollectionsRepository<
5151

5252
@Computed()
5353
public get entitiesArray(): V[] {
54-
const snapshot = this.snapshot;
55-
return snapshot.ids.map(id => snapshot.entities[id]);
54+
const snapshot: EntityCollections<V, K, C> = this.snapshot;
55+
return snapshot.ids.map((id: K): V => snapshot.entities[id]);
5656
}
5757

5858
@Computed()
@@ -68,7 +68,7 @@ export abstract class AbstractNgxsDataEntityCollectionsRepository<
6868
@Computed()
6969
public get entitiesArray$(): Observable<V[]> {
7070
return this.state$.pipe(
71-
map((value: EntityCollections<V, K, C>): V[] => value.ids.map(id => value.entities[id]))
71+
map((value: EntityCollections<V, K, C>): V[] => value.ids.map((id: K): V => value.entities[id]))
7272
);
7373
}
7474

0 commit comments

Comments
 (0)