()
| 258 | } |
| 259 | |
| 260 | function buildAddressBook(): AddressBook { |
| 261 | const person: Person = { |
| 262 | name: "Alice", |
| 263 | id: 123, |
| 264 | email: "alice@example.com", |
| 265 | tags: ["friend", "colleague"], |
| 266 | scores: new Map([ |
| 267 | ["math", 100], |
| 268 | ["science", 98], |
| 269 | ]), |
| 270 | salary: 120000.5, |
| 271 | phones: [ |
| 272 | buildPhoneNumber("555-0100", Person.PhoneType.MOBILE), |
| 273 | buildPhoneNumber("555-0111", Person.PhoneType.WORK), |
| 274 | ], |
| 275 | pet: { |
| 276 | case: AnimalCase.CAT, |
| 277 | value: buildCat(), |
| 278 | }, |
| 279 | }; |
| 280 | return { |
| 281 | people: [person], |
| 282 | peopleByName: new Map([[person.name, person]]), |
| 283 | }; |
| 284 | } |
| 285 | |
| 286 | function buildAutoIdEnvelope(): Envelope { |
| 287 | const payload: Envelope.Payload = { value: 42 }; |
no test coverage detected