1
2
3
const a = {
...(someCondition && { b: 5 }),
};