diff --git a/lib/node.js b/lib/node.js index c32843c59eb..83ad05c94f2 100644 --- a/lib/node.js +++ b/lib/node.js @@ -672,24 +672,24 @@ declare module "crypto" { size: number, callback: (err: ?Error, buffer: Buffer) => void ): void; - declare function randomFillSync(buffer: Buffer): void - declare function randomFillSync(buffer: Buffer, offset: number): void + declare function randomFillSync(buffer: Buffer | $TypedArray | DataView): void + declare function randomFillSync(buffer: Buffer | $TypedArray | DataView, offset: number): void declare function randomFillSync( - buffer: Buffer, + buffer: Buffer | $TypedArray | DataView, offset: number, size: number ): void declare function randomFill( - buffer: Buffer, + buffer: Buffer | $TypedArray | DataView, callback: (err: ?Error, buffer: Buffer) => void ): void declare function randomFill( - buffer: Buffer, + buffer: Buffer | $TypedArray | DataView, offset: number, callback: (err: ?Error, buffer: Buffer) => void ): void declare function randomFill( - buffer: Buffer, + buffer: Buffer | $TypedArray | DataView, offset: number, size: number, callback: (err: ?Error, buffer: Buffer) => void