@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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.313,785ts5.8
1.0.313,785ts5.2
1.0.313,785ts5.3
1.0.313,785ts5.4
1.0.313,785ts5.5
1.0.313,785ts5.9
1.0.313,785ts5.6
1.0.313,785ts5.1
1.0.313,785ts5.0
1.0.313,785ts4.9
1.0.313,785ts4.8
1.0.313,785ts4.7
1.0.313,785ts4.6
1.0.313,785ts4.5
1.0.313,785ts5.7
1.0.313,785latest
1.0.313,785ts6.0
1.0.1149ts4.4
1.0.1149ts3.0
1.0.1149ts3.1
1.0.1149ts3.2
1.0.1149ts3.3
1.0.1149ts3.4
1.0.1149ts3.5
1.0.1149ts3.6
1.0.1149ts3.7
1.0.1149ts3.8
1.0.1149ts3.9
1.0.1149ts4.0
1.0.1149ts4.1
1.0.1149ts4.2
1.0.1149ts4.3
1.0.01ts2.0
1.0.01ts2.9
1.0.01ts2.8
1.0.01ts2.7
1.0.01ts2.6
1.0.01ts2.5
1.0.01ts2.4
1.0.01ts2.3
1.0.01ts2.2
1.0.01ts2.1

Version History

VersionDownloads (Last 7 Days)Published
1.0.313,785
1.0.21
1.0.1149
1.0.01

Package Sidebar

Install

npm i @types/random-bytes

Weekly Downloads

10,990

Version

1.0.3

License

MIT

Unpacked Size

4.02 kB

Total Files

5

Last publish

Collaborators

  • types