interface Props {
a: string
b: number
}
interface Props {
d: () => void
}
const abcd: Props = {
a: 'string'
b: 1
d: function () {
console.log('hi')
}
}
interface aa {
a: number;
}
interface bb {
b: string
}
interface aabb extends aa, bb {
ab: boolean
}
const abab: aabb {
a: 0
b: 'abab'
ab: false
}
type과 interface를 사용하는 방법에 대해서는
끊임 없는 논쟁을..? 겪고 있다