interface IObjectKeys {
[key: string]: string | number | undefined;
}
interface IDevice extends IObjectKeys {
id: number;
room_id: number;
name: string;
type?: string;
description: string;
}
If you use the optional property in your object;
you should add 'undefined' value