本文整理汇总了TypeScript中eligibility/model/eligibilityCheck.eligible函数的典型用法代码示例。如果您正苦于以下问题:TypeScript eligible函数的具体用法?TypeScript eligible怎么用?TypeScript eligible使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eligible函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: checkEligibility
checkEligibility (value: DefendantAgeOption): EligibilityCheck {
switch (value) {
case DefendantAgeOption.YES:
return eligible()
case DefendantAgeOption.COMPANY_OR_ORGANISATION:
return eligible()
case DefendantAgeOption.NO:
return notEligible(NotEligibleReason.UNDER_18_DEFENDANT)
default:
throw new Error(`Unexpected claim value: ${value.option}`)
}
}
示例2: checkEligibility
checkEligibility (value: ClaimType): EligibilityCheck {
switch (value) {
case ClaimType.PERSONAL_CLAIM:
return eligible()
case ClaimType.MULTIPLE_CLAIM:
return notEligible(NotEligibleReason.MULTIPLE_CLAIMANTS)
case ClaimType.REPRESENTATIVE_CLAIM:
return notEligible(NotEligibleReason.CLAIM_ON_BEHALF)
default:
throw new Error(`Unexpected ClaimType: ${value.option}`)
}
}
示例3: checkEligibility
checkEligibility (value: ClaimValue): EligibilityCheck {
switch (value) {
case ClaimValue.NOT_KNOWN:
return notEligible(NotEligibleReason.CLAIM_VALUE_NOT_KNOWN)
case ClaimValue.OVER_10000:
return notEligible(NotEligibleReason.CLAIM_VALUE_OVER_10000)
case ClaimValue.UNDER_10000:
return eligible()
default:
throw new Error(`Unexpected claim value: ${value.option}`)
}
}
示例4: checkEligibility
checkEligibility (value: YesNoOption): EligibilityCheck {
return value === YesNoOption.YES ? eligible() : notEligible(NotEligibleReason.DEFENDANT_ADDRESS)
}
示例5: checkEligibility
checkEligibility (value: YesNoOption): EligibilityCheck {
return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.HELP_WITH_FEES)
}
示例6: checkEligibility
checkEligibility (value: YesNoOption): EligibilityCheck {
return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.CLAIM_IS_FOR_TENANCY_DEPOSIT)
}
示例7: checkEligibility
checkEligibility (value: YesNoOption): EligibilityCheck {
return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.GOVERNMENT_DEPARTMENT)
}
示例8: checkEligibility
checkEligibility (value: YesNoOption): EligibilityCheck {
return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.MULTIPLE_DEFENDANTS)
}
示例9: checkEligibility
checkEligibility (value: YesNoOption): EligibilityCheck {
return value === YesNoOption.YES ? eligible() : notEligible(NotEligibleReason.UNDER_18)
}