타입 별칭과 인덱스 시그니처
타입 별칭 (Type Alias)
type User = {
id: number;
name: string;
birth : string
location : string
}
let user : User{
} = {
id: 1,
name: "신봄",
birth: "1989.02.12",
location: "서울",
};
function func() {
type User = {}
// func 스코프 안의 User타입
}
인덱스 시그니쳐(Index Signature)
Last updated