index.d.ts 499 B

1234567891011121314151617181920212223
  1. declare module 'node-object-hash' {
  2. namespace apiConstructor {
  3. interface HashOptions {
  4. coerce?: boolean,
  5. sort?: boolean,
  6. alg?: string,
  7. enc?: string,
  8. }
  9. interface API {
  10. hash(object: any, opts?: {
  11. alg?: string,
  12. enc?: string,
  13. }): string;
  14. sortObject(object: any): string;
  15. sort(object: any): string;
  16. }
  17. }
  18. function apiConstructor(options?: apiConstructor.HashOptions): apiConstructor.API;
  19. export = apiConstructor;
  20. }