UNPKG

@sap-cloud-sdk/core

Version:
15 lines 946 B
import BigNumber from 'bignumber.js'; import moment from 'moment'; import { Time, EdmTypeShared } from '../odata-common'; import { EdmType } from './edm-types'; /** * @hidden */ export declare function edmToTs<T extends EdmType>(value: any, edmType: EdmTypeShared<'v4'>): EdmToPrimitive<T>; /** * @hidden */ export declare function tsToEdm(value: any, edmType: EdmTypeShared<'v4'>): any; export declare type EdmToPrimitive<T extends EdmType> = T extends 'Edm.Int16' | 'Edm.Int32' | 'Edm.Single' | 'Edm.Double' | 'Edm.Float' | 'Edm.Byte' | 'Edm.SByte' ? number : T extends 'Edm.Decimal' | 'Edm.Int64' ? BigNumber : T extends 'Edm.DateTime' | 'Edm.DateTimeOffset' ? moment.Moment : T extends 'Edm.String' | 'Edm.Guid' ? string : T extends 'Edm.Boolean' ? boolean : T extends 'Edm.Time' ? Time : any; export { edmToTs as edmToTsV4, tsToEdm as tsToEdmV4, EdmToPrimitive as EdmToPrimitiveV4 }; //# sourceMappingURL=payload-value-converter.d.ts.map