smartjson/ts/smartjson.plugins.ts
2019-12-15 19:05:20 +00:00

19 lines
543 B
TypeScript

import lodashCloneDeep from 'lodash.clonedeep';
import stableJson2 from 'fast-json-stable-stringify';
const stableJson = stableJson2 as any;
export { lodashCloneDeep, stableJson };
export interface IStableJsonTypes {
Comparator: (a: IStableJsonTypes['CompareDescriptor'], b: IStableJsonTypes['CompareDescriptor']) => number;
CompareDescriptor: {
key: string;
value: any;
};
Options: {
cmp?: (a: IStableJsonTypes['CompareDescriptor'], b: IStableJsonTypes['CompareDescriptor']) => number;
cycles?: boolean;
};
}