The function executed to verify a particular condition until it's passed
Optionaltimeout: number
Optional duration in milliseconds until the task is aborted (defaults to undefined, meaning no timeout)
OptionalcheckFrequency: number
Optional frequency in milliseconds to check for an update (defaults to 100 milliseconds)
A promise that resolves when the check passes
This asynchronous generic function checks for a validity of something via the checkCallback() until it's found or until the timer runs out. This method returns a Promise which the developer can use to await or use .then().catch().finally() principles.