(options)
| 305 | } |
| 306 | |
| 307 | function validateApplicationInfo(options) { |
| 308 | function validateString(key) { |
| 309 | const str = options[key]; |
| 310 | |
| 311 | if (str !== null && str !== undefined && typeof str !== 'string') { |
| 312 | throw new TypeError(`${key} should be a String`); |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | validateString('applicationName'); |
| 317 | validateString('applicationVersion'); |
| 318 | |
| 319 | if (options.id !== null && options.id !== undefined && !(options.id instanceof types.Uuid)) { |
| 320 | throw new TypeError('Client id must be a Uuid'); |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | function validateMonitorReporting(options) { |
| 325 | const o = options.monitorReporting; |
no test coverage detected