I have this type defined
export interface Hostel {
id: String;
}
I want to check if an object is from that type, but there is no way. I have tried with
console.log ('************ ', (typeof result === 'Hostel'));
console.log ('************ ', (typeof result === Hostel));
console.log ('************ ', result instanceof Hostel);
I have this error:
'Hostel' only refers to a type, but is being used as a value here.