deno.land / x / abc@v1.3.3 / examples / cat_app / cat.ts
123456789101112131415161718192021let catId = 1;function genCatId(): number { return catId++;}
export class Cat { id: number; name: string; age: number; constructor(cat: CatDTO) { this.id = genCatId(); this.name = cat.name; this.age = cat.age; }}
export interface CatDTO { name: string; age: number;}
Version Info