|
@@ -1,4 +1,4 @@
|
|
-import {Book, DamageLogger} from './interfaces';
|
|
|
|
|
|
+import {Author, Book, DamageLogger, Librarian} from './interfaces';
|
|
import {Category} from "./enums";
|
|
import {Category} from "./enums";
|
|
|
|
|
|
function GetAllBooks(): Book[] {
|
|
function GetAllBooks(): Book[] {
|
|
@@ -156,5 +156,17 @@ let myBook: Book = {
|
|
// PrintBook(myBook);
|
|
// PrintBook(myBook);
|
|
// myBook.markDamaged('Torn back cover');
|
|
// myBook.markDamaged('Torn back cover');
|
|
|
|
|
|
-let logDamage: DamageLogger = reason => console.log(`Damage reported: ${reason}.`);
|
|
|
|
-logDamage('Coffee stains');
|
|
|
|
|
|
+// let logDamage: DamageLogger = reason => console.log(`Damage reported: ${reason}.`);
|
|
|
|
+// logDamage('Coffee stains');
|
|
|
|
+
|
|
|
|
+let favoriteAuthor: Author = {
|
|
|
|
+ email: 'foo@example.com',
|
|
|
|
+ numBooksPublished: 1,
|
|
|
|
+ name: 'Foo',
|
|
|
|
+};
|
|
|
|
+let favoriteLibrarian: Librarian = {
|
|
|
|
+ email: "jane@example.com",
|
|
|
|
+ name: 'Jane Doe',
|
|
|
|
+ departement: 'Sales',
|
|
|
|
+ assistCustomer: (custName: string) => console.log(`Helping ${custName}.'),
|
|
|
|
+}
|