72일 차 회고
- typescript interface vs type
interface Person {
name : string
age: number
}
//확장
interface Student extends Person {
schoo; : string
}
//선언병합
interface Person {
old:string
}
//객체
let a : person = {
"name" : "타입스크립트"
"type" : "typescript"
}
//가장 기본적인 형식을 참조한다.
const var_1: string = "";
const var_2 : boolean = false;
const var_3 : undefined = undefined;
const var_4: Array<any> = []
// union
type CombineNumberString = string | number;
// 함수반환형
type B = (name: string) => string
const b : B = (name) => "hello"