const person1: {
name: string,
age: number,
married: boolean
} = {
name: 'zero',
age: 28,
married: false,
};
type Person = {
name: string,
age: number,
married: boolean
}
const person2: Person = {
name: 'zero',
age: 28,
married: false,
}
const person3: Person = {
name: 'nero',
age: 32,
married: true,
}
타입 별칭으로 분리하면 person2와 person3처럼 Person 타입을 재사용할 수 있어 좋습니다.