import * as t from 'io-ts' ; import { UUID } from 'io-ts-types/lib/UUID' ; import { $cast } from './cast' ; export const BookInput = t . exact ( t . type ( { name : t . string } ) ) ; export const Book = t . exact ( t . type ( { id : UUID , name : t . string } ) ) ; export const castBook = $cast ( Book ) ; export const castBookInput = $cast ( BookInput ) ; export type Book = t . TypeOf < typeof Book > ; export type BookInput = t . TypeOf < typeof BookInput > ;