1 | import BigNumber from 'bignumber.js';
|
2 | import moment from 'moment';
|
3 | import { Time, EdmTypeShared } from '../odata-common';
|
4 | import { EdmType } from './edm-types';
|
5 |
|
6 |
|
7 |
|
8 | export declare function edmToTs<T extends EdmType>(value: any, edmType: EdmTypeShared<'v4'>): EdmToPrimitive<T>;
|
9 |
|
10 |
|
11 |
|
12 | export declare function tsToEdm(value: any, edmType: EdmTypeShared<'v4'>): any;
|
13 | 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;
|
14 | export { edmToTs as edmToTsV4, tsToEdm as tsToEdmV4, EdmToPrimitive as EdmToPrimitiveV4 };
|
15 |
|
\ | No newline at end of file |