deno.land / x / abc@v1.3.3 / examples / cat_app / cat.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
let 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;}
abc

Version Info

Tagged at
3 years ago