Open vedantroy opened 4 years ago
type should be
declare function stringify(obj: any, options?: stringify.Options | stringify.Comparator): string;
declare namespace stringify {
interface Options {
cmp?: (a: CompareDescriptor, b: CompareDescriptor) => number;
cycles?: boolean;
}
type Comparator = (a: CompareDescriptor, b: CompareDescriptor) => number;
interface CompareDescriptor {
key: string;
value: any;
}
}
The current index.d.ts file looks like this:
This makes it impossible to use this module from Typescript unless a certain flag is turned on (I forget the flag name) because this syntax is outdated.
I recommend updating the index.d.ts file to:
Not sure if that's correct, but I think it is?