// Type definitions for random-bytes 1.0 // Project: https://github.com/crypto-utils/random-bytes // Definitions by: Steve Ripberger // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// 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; /** * Synchronously generates strong pseudo-random bytes. * @param size - Number of bytes to generate. */ sync(size: number): Buffer; } declare const randomBytes: RandomBytesStatic; export = randomBytes;