I want to make interface property with two diferent interfaces in typescript. can this be possible?
interface IPayload1 {
id: string;
name: string;
}
interface IPayload2 {
id: string;
price: number;
}
interface Demo {
// Can this be possible?
payload: IPayload1 | IPayload2;
}