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

0.8.3 • Public • Published

Installation

npm install --save @types/rusha

Summary

This package contains type definitions for rusha (https://github.com/srijs/rusha#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rusha.

index.d.ts

/// <reference types="node" />

interface Hash {
    update(value: string | number[] | ArrayBuffer | Buffer): Hash;
    digest(encoding?: undefined): ArrayBuffer;
    digest(encoding: "hex"): string;
}

interface RushaWorkerRequest {
    id: string;
    data: string | number[] | ArrayBuffer | Buffer | Blob;
}

interface RushaWorkerResponse {
    id: string;
    hash: string;
}

interface RushaWorker extends Worker {
    onmessage: ((this: RushaWorker, res: MessageEvent<RushaWorkerResponse>) => void) | null;
    postMessage(req: RushaWorkerRequest): void;
    terminate(): void;
}

interface Rusha {
    createHash(): Hash;
    createWorker(): RushaWorker;
    disableWorkerBehaviour(): void;
}

declare const Rusha: Rusha;

export = Rusha;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Jacopo Scazzosi.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/rusha

Weekly Downloads

1,216

Version

0.8.3

License

MIT

Unpacked Size

4.08 kB

Total Files

5

Last publish

Collaborators

  • types