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

1.0.3 • Public • Published

Installation

npm install --save @types/random-bytes

Summary

This package contains type definitions for random-bytes (https://github.com/crypto-utils/random-bytes).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/random-bytes.

index.d.ts

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

interface RandomBytesStatic {
    /**
     * Generates strong pseudo-random bytes.
     * @param size - Number of bytes to generate.
     * @param callback - Asynchronous callback function.
     */
    (size: number, callback: (error: Error, bytes: Buffer) => void): void;

    /**
     * Generates strong pseudo-random bytes.
     * @param size - Number of bytes to generate.
     */
    (size: number): Promise<Buffer>;

    /**
     * Synchronously generates strong pseudo-random bytes.
     * @param size - Number of bytes to generate.
     */
    sync(size: number): Buffer;
}

declare const randomBytes: RandomBytesStatic;

export = randomBytes;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Steve Ripberger.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @types/random-bytes

    Weekly Downloads

    11,546

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    4.02 kB

    Total Files

    5

    Last publish

    Collaborators

    • types