type EatType = (food:string)=> void;
interface EatInterface {
(food:string):void;
}
type PersonList = string[];
interface IPersonList {
[index:number]:string;
}
interface ErrorHandling{
success:boolean;
error?:{message:string};
}
interface ArtistsData{
artists: {name:string}[];
}
type ArtistsResponseType = ArtistsData & ErrorHandling;
interface IArtistsResponse extends ArtistsData, ErrorHandling{}
let art:ArtistsResponseType;
let iar:IArtistsResponse;
같은 이름의 인터페이스를 여러개 만들경우, 사용할땐 하나로 합쳐진다.