|
@@ -1,5 +1,6 @@
|
|
-import {Author, Book, DamageLogger, Librarian} from './interfaces';
|
|
|
|
|
|
+import {Book, DamageLogger, Librarian} from './interfaces';
|
|
import {Category} from "./enums";
|
|
import {Category} from "./enums";
|
|
|
|
+import {UniversityLibrarian} from "./classes";
|
|
|
|
|
|
function GetAllBooks(): Book[] {
|
|
function GetAllBooks(): Book[] {
|
|
const books = [
|
|
const books = [
|
|
@@ -159,14 +160,6 @@ let myBook: Book = {
|
|
// let logDamage: DamageLogger = reason => console.log(`Damage reported: ${reason}.`);
|
|
// let logDamage: DamageLogger = reason => console.log(`Damage reported: ${reason}.`);
|
|
// logDamage('Coffee stains');
|
|
// 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}.'),
|
|
|
|
-}
|
|
|
|
|
|
+let favoriteLibrarian: Librarian = new UniversityLibrarian();
|
|
|
|
+favoriteLibrarian.name = 'Sharon';
|
|
|
|
+favoriteLibrarian.assistCustomer('Lynda');
|