Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Use case

Pseudo code

async function processClaim(claim: SubmittedClaim) {
let isEligible = eligibilityService.isEligibile(claim)
let fiveMinuteTimer = wait.minutes(5)
await Promise.race([future, isEligible])
if (isEligible.value === true) {
await mailService.sendMail(TEMPLATE_ELIGIBLE, claim)
} else if (isEligible.value === false) {
await mailService.sendMail(TEMPLATE_NOT_ELIGIBLE, claim)
} else {
await mailService.sendMail(TEMPLATE_CLAIM_RECEIVED, claim)