smartjson/ts/smartjson.plugins.ts
2024-03-03 10:29:18 +01:00

32 lines
752 B
TypeScript

// @pushrocks scope
import * as smartenv from '@push.rocks/smartenv';
import * as smartstring from '@push.rocks/smartstring';
export { smartenv, smartstring };
// third party scope
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;
};
}