mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
23 lines
584 B
TypeScript
23 lines
584 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;
|
|
|
|
export default { h32, h64 };
|