Created
June 11, 2019 03:11
-
-
Save DanGe42/e1eccdcd860a7724a9c0a54efb7463b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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