-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
space thee A's in test, remove some union functions
- Loading branch information
1 parent
085ad4a
commit 78b2275
Showing
6 changed files
with
16 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import { createAction, props, union } from '@ngrx/store'; | ||
import { createAction, props } from '@ngrx/store'; | ||
import { Book } from '@example-app/books/models/book'; | ||
|
||
export const loadBook = createAction( | ||
'[Book Exists Guard] Load Book', | ||
props<{ book: Book }>() | ||
); | ||
|
||
const all = union({ loadBook }); | ||
export type BookActionsUnion = typeof all; | ||
export type BookActionsUnion = ReturnType<typeof loadBook>; |
6 changes: 2 additions & 4 deletions
6
projects/example-app/src/app/books/actions/find-book-page.actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import { createAction, props, union } from '@ngrx/store'; | ||
import { createAction, props } from '@ngrx/store'; | ||
|
||
export const searchBooks = createAction( | ||
'[Find Book Page] Search Books', | ||
props<{ query: string }>() | ||
); | ||
|
||
const all = union({ searchBooks }); | ||
|
||
export type FindBookPageActionsUnion = typeof all; | ||
export type FindBookPageActionsUnion = ReturnType<typeof searchBooks>; |
5 changes: 2 additions & 3 deletions
5
projects/example-app/src/app/books/actions/view-book-page.actions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { createAction, union, props } from '@ngrx/store'; | ||
import { createAction, props } from '@ngrx/store'; | ||
|
||
export const selectBook = createAction( | ||
'[View Book Page] Select Book', | ||
props<{ id: string }>() | ||
); | ||
|
||
const all = union({ selectBook }); | ||
export type ViewBookPageActionsUnion = typeof all; | ||
export type ViewBookPageActionsUnion = ReturnType<typeof selectBook>; |