UNPKG

@types/xxhashjs

Version:
44 lines (33 loc) 1.3 kB
# Installation > `npm install --save @types/xxhashjs` # Summary This package contains type definitions for xxhashjs (https://github.com/pierrec/js-xxhash). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xxhashjs. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xxhashjs/index.d.ts) ````ts /// <reference types="node" /> export as namespace XXH; // Ideally we would have a type definition for the "cuint" package. // The following interface `UINT` is to resolve the bare minimum. export interface UINT { toNumber(): number; toString(radix?: number): string; } export interface HashObject { init(seed: number): this; update(data: string | ArrayBuffer | Buffer): this; digest(): UINT; } export interface HashInterface { (seed?: number): HashObject; (data: string | ArrayBuffer | Buffer, seed: number): UINT; } export const h32: HashInterface; export const h64: HashInterface; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: [@types/node](https://npmjs.com/package/@types/node) # Credits These definitions were written by [Dibyo Majumdar](https://github.com/mDibyo), and [Nick Zahn](https://github.com/Manc).