Skip to content

Commit

Permalink
fix(Schematics): Correct usage of upsert actions for entity blueprint (
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts authored and MikeRyanDev committed Feb 15, 2018
1 parent 55df574 commit 1ffb5a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/entity/adapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class AddUser implements Action {
export class UpsertUser implements Action {
readonly type = UserActionTypes.UPSERT_USER;

constructor(public payload: { user: User }) {}
constructor(public payload: { user: Update<User> }) {}
}

export class AddUsers implements Action {
Expand All @@ -148,7 +148,7 @@ export class AddUsers implements Action {
export class UpsertUsers implements Action {
readonly type = UserActionTypes.UPSERT_USERS;

constructor(public payload: { users: User[] }) {}
constructor(public payload: { users: Update<User>[] }) {}
}

export class UpdateUser implements Action {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Add<%= classify(name) %> implements Action {
export class Upsert<%= classify(name) %> implements Action {
readonly type = <%= classify(name) %>ActionTypes.Upsert<%= classify(name) %>;

constructor(public payload: { <%= camelize(name) %>: <%= classify(name) %> }) {}
constructor(public payload: { <%= camelize(name) %>: Update<<%= classify(name) %>> }) {}
}

export class Add<%= classify(name) %>s implements Action {
Expand All @@ -42,7 +42,7 @@ export class Add<%= classify(name) %>s implements Action {
export class Upsert<%= classify(name) %>s implements Action {
readonly type = <%= classify(name) %>ActionTypes.Upsert<%= classify(name) %>s;

constructor(public payload: { <%= camelize(name) %>s: <%= classify(name) %>[] }) {}
constructor(public payload: { <%= camelize(name) %>s: Update<<%= classify(name) %>>[] }) {}
}

export class Update<%= classify(name) %> implements Action {
Expand Down

0 comments on commit 1ffb5a9

Please sign in to comment.