Skip to content

Commit 9b65db3

Browse files
docs(store): add missing types to walkthrough example (#3206)
Closes #3203
1 parent 1f27b72 commit 9b65db3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

projects/ngrx.io/content/examples/store-walkthrough/src/app/app.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export class AppComponent {
1717
books$ = this.store.select(selectBooks);
1818
bookCollection$ = this.store.select(selectBookCollection);
1919

20-
onAdd(bookId) {
20+
onAdd(bookId: string) {
2121
this.store.dispatch(addBook({ bookId }));
2222
}
2323

24-
onRemove(bookId) {
24+
onRemove(bookId: string) {
2525
this.store.dispatch(removeBook({ bookId }));
2626
}
2727

projects/ngrx.io/content/examples/store-walkthrough/src/app/book-collection/book-collection.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import { Book } from '../book-list/books.model';
88
})
99
export class BookCollectionComponent {
1010
@Input() books: Array<Book>;
11-
@Output() remove = new EventEmitter();
11+
@Output() remove = new EventEmitter<string>();
1212
}

projects/ngrx.io/content/examples/store-walkthrough/src/app/book-list/book-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import { Book } from './books.model';
88
})
99
export class BookListComponent {
1010
@Input() books: Array<Book>;
11-
@Output() add = new EventEmitter();
11+
@Output() add = new EventEmitter<string>();
1212
}

0 commit comments

Comments
 (0)