( remoteTypeId: number, localTypeId: number, value: string, converter: string, )
| 411 | } |
| 412 | |
| 413 | function integerToIntegerExpr( |
| 414 | remoteTypeId: number, |
| 415 | localTypeId: number, |
| 416 | value: string, |
| 417 | converter: string, |
| 418 | ): string { |
| 419 | if (remoteTypeId === localTypeId) { |
| 420 | return value; |
| 421 | } |
| 422 | if (integerRangeFits(remoteTypeId, localTypeId)) { |
| 423 | if (localTypeId === TypeId.INT64 || localTypeId === TypeId.UINT64) { |
| 424 | return `BigInt(${value})`; |
| 425 | } |
| 426 | return value; |
| 427 | } |
| 428 | return `${converter}.${checkedIntegerMethod(localTypeId)}(${value})`; |
| 429 | } |
| 430 | |
| 431 | function checkedIntegerMethod(localTypeId: number): string | null { |
| 432 | switch (localTypeId) { |
no test coverage detected