Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Schematics): Correct usage of upsert actions for entity blueprint #821

Merged
merged 1 commit into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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