当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript eligibilityCheck.eligible函数代码示例

本文整理汇总了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}`)
   }
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:12,代码来源:defendant-age.ts

示例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}`)
   }
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:12,代码来源:claim-type.ts

示例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}`)
   }
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:12,代码来源:claim-value.ts

示例4: checkEligibility

 checkEligibility (value: YesNoOption): EligibilityCheck {
   return value === YesNoOption.YES ? eligible() : notEligible(NotEligibleReason.DEFENDANT_ADDRESS)
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:3,代码来源:defendant-address.ts

示例5: checkEligibility

 checkEligibility (value: YesNoOption): EligibilityCheck {
   return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.HELP_WITH_FEES)
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:3,代码来源:help-with-fees.ts

示例6: checkEligibility

 checkEligibility (value: YesNoOption): EligibilityCheck {
   return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.CLAIM_IS_FOR_TENANCY_DEPOSIT)
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:3,代码来源:claim-is-for-tenancy-deposit.ts

示例7: checkEligibility

 checkEligibility (value: YesNoOption): EligibilityCheck {
   return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.GOVERNMENT_DEPARTMENT)
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:3,代码来源:government-department.ts

示例8: checkEligibility

 checkEligibility (value: YesNoOption): EligibilityCheck {
   return value === YesNoOption.NO ? eligible() : notEligible(NotEligibleReason.MULTIPLE_DEFENDANTS)
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:3,代码来源:single-defendant.ts

示例9: checkEligibility

 checkEligibility (value: YesNoOption): EligibilityCheck {
   return value === YesNoOption.YES ? eligible() : notEligible(NotEligibleReason.UNDER_18)
 }
开发者ID:hmcts,项目名称:cmc-citizen-frontend,代码行数:3,代码来源:over-18.ts


注:本文中的eligibility/model/eligibilityCheck.eligible函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。