Skip to content

src/types.ts โ€‹

From Week 2 in-class: books router ยท original: week2-router/src/types.ts ยท all files in this project

ts
export const enum BookStatus {
    STATUS_AVAILABLE,
    STATUS_CHECKED_OUT,
    STATUS_LOST
  }
  export interface Book {
    id: number,
    title: string,
    author: string,
    year: number,
    status: BookStatus
  }
  export type BookFilter = string | number;