Skip to content

Instantly share code, notes, and snippets.

@DanGe42
Created June 11, 2019 03:11
Show Gist options
  • Save DanGe42/e1eccdcd860a7724a9c0a54efb7463b2 to your computer and use it in GitHub Desktop.
Save DanGe42/e1eccdcd860a7724a9c0a54efb7463b2 to your computer and use it in GitHub Desktop.
function getWhateverObject() {
return Promise.resolve({ getBooleanValue() { return true; } })
}
async function iNeedThisBoolean() {
const someObject = await getWhateverObject();
const fWhatever = someObject.getBooleanValue();
if (fWhatever) {
console.log("true");
} else {
console.log("false");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment