epoberezkin / fast-json-stable-stringify

Deterministic JSON.stringify() - a faster version of @substack's json-stable-strigify without jsonify.
Other
285 stars 34 forks source link

TypeScript definition does not include opt #11

Open patarapolw opened 4 years ago

patarapolw commented 4 years ago

https://www.npmjs.com/package/fast-json-stable-stringify#options should be in

declare module 'fast-json-stable-stringify' {
  function stringify(obj: any): string;
  export = stringify;
}

I also need replacer, but this is another topic.

marceliwac commented 4 years ago

As extremely simple as it is, I'm struggling with checking out the fork for this repository and submitting a PR. The needed changes are:

index.d.ts:

declare module 'fast-json-stable-stringify' {
  function stringify(obj: any, options: object): string;
  export = stringify;
}
sxwei123 commented 3 years ago

Added in this PR: https://github.com/epoberezkin/fast-json-stable-stringify/pull/41