일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 정렬
- nodejs
- AWS
- Bull
- game
- nestjs
- 게임
- react
- Nest.js
- Express
- class
- GIT
- dfs
- typeORM
- OCR
- cookie
- MySQL
- MongoDB
- JavaScript
- TypeScript
- flask
- Queue
- Python
- mongoose
- 공룡게임
- 자료구조
- jest
- Sequelize
- Dinosaur
- Today
- Total
목록Interface (2)
포시코딩
추상 클래스 (Abstract class) 추상 클래스 사용 예시 abstract class User { constructor ( protected firstName: string, protected lastName: string ) {} abstract sayHi(name: string): string abstract fullName(): string } class Player extends User { fullName(): string { return `${this.firstName} ${this.lastName}` } sayHi(name: string): string { return `Hello ${name}. My name is ${this.fullName()}` } } 추상 클래스인 User 클..
readonly TypeScript type Words = { [key: string]: string } class Dict { private words: Words constructor() { this.words = {} } add(word: Word) { if (this.words[word.term] === undefined) { this.words[word.term] = word.def; } } def(term: string) { return this.words[term]; } } class Word { constructor ( public term: string, public def: string ) {} } const kimchi = new Word('kimchi', '한국의 음식'); cons..