I'm not idiomatic at all in JS and have a situation where I want to extract an object's boolean property. If it's there, I use it. If it's not, I default to true. My unseasoned JS/TS mind did this:
const anObjectProperty: boolean = myObject?.myProperty ? myObject.myProperty : true
I suspect TS devs may have some idiomatic way like all the ?? and other things I don't know atm 😆
Thank you for your time 🙂