mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
34 lines
747 B
TypeScript
34 lines
747 B
TypeScript
// Type definitions for json-stable-stringify 1.0.0
|
|
// Project: https://github.com/substack/json-stable-stringify
|
|
// Definitions by: Matt Frantz <https://github.com/mhfrantz/>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
declare module 'json-stable-stringify' {
|
|
|
|
function stringify(obj: any, opts?: stringify.Comparator | stringify.Options): string;
|
|
|
|
module stringify {
|
|
|
|
interface Element {
|
|
key: string;
|
|
value: any;
|
|
}
|
|
|
|
interface Comparator {
|
|
(a: Element, b: Element): number;
|
|
}
|
|
|
|
interface Replacer {
|
|
(key: string, value: any): any;
|
|
}
|
|
|
|
interface Options {
|
|
cmp?: Comparator;
|
|
space?: number | string;
|
|
replacer?: Replacer;
|
|
}
|
|
}
|
|
|
|
export = stringify;
|
|
}
|