@odata2ts/converter-v2-to-v4
Version:
A set of odata2ts compatible converters to convert certain OData V2 types to their V4 analog
11 lines (10 loc) • 590 B
TypeScript
import { ValueConverter } from "@odata2ts/converter-api";
/**
* V2 maps certain number types to string values, while V4 maps all number types to number values.
* This converter converts those V2 string based numbers to JS numbers in order to align with V4.
*
* Since The JS number type is not sufficient to represent all possible Edm.Int64 and Edm.Decimal values,
* V4 also defines a technique, so that those data types can be retrieved as strings.
* Another converter would need to take care of that.
*/
export declare const stringToNumberConverter: ValueConverter<string, number>;