Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- SSE
- 열공하자
- Partition
- 성장기
- node.js란
- node.js
- partitioning
- 파티셔닝
- 개발자
- Node.js기본
- mariadb
- 실시간알림
- Lag
- frontend
- PostgreSQL
- ServerSentEvent
- EventSource
- localStorage
Archives
- Today
- Total
써치킴의 우당탕탕 개발 블로그
[TypeScript][ch6][Class] initialization in constructor parameters 본문
TypeScript 합시다
[TypeScript][ch6][Class] initialization in constructor parameters
써치킴 2022. 2. 15. 04:03class Person4 {
public constructor(public name: string, public age: number){}
// this.name = name; 쓸 필요없이 해당 방식 사용 가능
}
const p4 = new Person4("Searchkim", 20);
console.log(p4);
'TypeScript 합시다' 카테고리의 다른 글
[TypeScript][ch6][Class] readonly properties (0) | 2022.02.15 |
---|---|
[TypeScript][ch6][Class] Getter & Setter (0) | 2022.02.15 |
[TypeScript][ch6][Class] 접근 제어자(Access Modifiers) (0) | 2022.02.15 |
[TypeScript][ch6][Class] constructor(생성자) & initialize(초기화) (0) | 2022.02.15 |
[TypeScript][ch6][Class] Quick Start - class (0) | 2022.02.15 |
Comments