briebug / ngrx-auto-entity

NgRx Auto-Entity: Simplifying Reactive State
https://briebug.gitbook.io/ngrx-auto-entity/
Other
66 stars 12 forks source link

Expand data transformations to include custom criteria #93

Closed jrista closed 4 years ago

jrista commented 4 years ago

Currently, custom transformations, introduced in v0.4.2, only pass in the entity being transformed. However there are use cases where custom criteria could be extremely useful in performing transformations. Inclusion of custom criteria in the transformation calls should be a simple change, and would greatly expand their capabilities.

export interface IEntityTransformer {
  fromServer: (data: any, criteria?: any): any;
  toServer: (entity: any, criteria?: any): any;
}