Files
DefinitelyTyped/types/xxhashjs/index.d.ts
Andy 95d011b777 xxhashjs: Fix export style (#20197)
* xxhashjs: Fix export style

* `export const defaultExport` -> `declare`
2017-10-02 09:06:38 -07:00

24 lines
652 B
TypeScript

// Type definitions for xxhashjs 0.1
// Project: https://github.com/pierrec/js-xxhash
// Definitions by: Dibyo Majumdar <https://github.com/mDibyo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export as namespace XXH;
export interface HashObject {
init(seed: number): this;
update(data: string | ArrayBuffer): this;
digest(): number;
}
export interface HashInterface {
(seed?: number): HashObject;
(data: string | ArrayBuffer, seed: number): number;
}
export const h32: HashInterface;
export const h64: HashInterface;
declare const defaultExport: { h32: typeof h32, h64: typeof h64 };
export default defaultExport;