export type PropsType = {
param1?: string;
param2?: string;
};
export type Some = {
p1?: string,
p2?: string
}
function isEmpty(o: Object): boolean{
return Object.keys(o).length === 0
}
let a: Some = {},
b: Some = {p1: "Value"}
console.log(`Object <a>${ isEmpty(a) ? '' : ' not ' } empty`);
// Object <a> empty
console.log(`Object <b>${ isEmpty(b) ? '' : ' not ' } empty`);
// Object <b> not empty