(value: number, localTypeId: number)
| 567 | } |
| 568 | |
| 569 | function floatToFloat(value: number, localTypeId: number): number { |
| 570 | if (!Number.isFinite(value)) { |
| 571 | if (Number.isNaN(value)) { |
| 572 | throw new Error("Scalar NaN cannot be converted losslessly."); |
| 573 | } |
| 574 | return value; |
| 575 | } |
| 576 | return exactFloat(floatToParts(value), localTypeId); |
| 577 | } |
| 578 | |
| 579 | export class CompatibleScalarConverter { |
| 580 | static readDecimal(reader: BinaryReader): Decimal { |
no test coverage detected