當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript NameFormatter.fullName方法代碼示例

本文整理匯總了TypeScript中utils/nameFormatter.NameFormatter.fullName方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript NameFormatter.fullName方法的具體用法?TypeScript NameFormatter.fullName怎麽用?TypeScript NameFormatter.fullName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在utils/nameFormatter.NameFormatter的用法示例。


在下文中一共展示了NameFormatter.fullName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

 constructor (title?: string, firstName?: string, lastName?: string, address?: Address, email?: string, businessName?: string) {
   super(PartyType.SOLE_TRADER_OR_SELF_EMPLOYED.value, NameFormatter.fullName(firstName, lastName, title), address, email)
   this.businessName = businessName
   this.title = title
   this.firstName = firstName
   this.lastName = lastName
 }
開發者ID:hmcts,項目名稱:cmc-citizen-frontend,代碼行數:7,代碼來源:soleTrader.ts

示例2: deserialize

 deserialize (input: any): SoleTrader {
   if (input) {
     Object.assign(this, new TheirDetails().deserialize(input))
     this.businessName = input.businessName
     this.type = PartyType.SOLE_TRADER_OR_SELF_EMPLOYED.value
     this.title = input.title
     if (input.firstName && input.lastName) {
       this.firstName = input.firstName
       this.lastName = input.lastName
       this.name = NameFormatter.fullName(input.firstName, input.lastName, input.title)
     }
   }
   return this
 }
開發者ID:hmcts,項目名稱:cmc-citizen-frontend,代碼行數:14,代碼來源:soleTrader.ts

示例3: deserialize

 deserialize (input: any): Individual {
   if (input) {
     Object.assign(this, new TheirDetails().deserialize(input))
     if (input.dateOfBirth) {
       this.dateOfBirth = input.dateOfBirth
     }
     this.title = input.title
     if (input.firstName && input.lastName) {
       this.firstName = input.firstName
       this.lastName = input.lastName
       this.name = NameFormatter.fullName(input.firstName, input.lastName, input.title)
     }
     this.type = PartyType.INDIVIDUAL.value
   }
   return this
 }
開發者ID:hmcts,項目名稱:cmc-citizen-frontend,代碼行數:16,代碼來源:individual.ts

示例4: it

 it('should format name from title, first and last name', () => {
   expect(NameFormatter.fullName('Coffee', 'McCoffee', 'Mr.')).to.eq('Mr. Coffee McCoffee')
 })
開發者ID:hmcts,項目名稱:cmc-citizen-frontend,代碼行數:3,代碼來源:nameFormatter.ts

示例5: constructor

 constructor (title?: string, firstName?: string, lastName?: string, address?: Address, email?: string) {
   super(PartyType.INDIVIDUAL.value, NameFormatter.fullName(firstName, lastName, title), address, email)
   this.title = title
   this.firstName = firstName
   this.lastName = lastName
 }
開發者ID:hmcts,項目名稱:cmc-citizen-frontend,代碼行數:6,代碼來源:individual.ts


注:本文中的utils/nameFormatter.NameFormatter.fullName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。