@types/xxhashjs
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

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

/// <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

Credits

These definitions were written by Dibyo Majumdar, and Nick Zahn.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/xxhashjs

Weekly Downloads

18,368

Version

0.2.4

License

MIT

Unpacked Size

4.01 kB

Total Files

5

Last publish

Collaborators

  • types