UNPKG

519 BTypeScriptView Raw
1// Type definitions for buffer-from 1.1
2// Project: https://github.com/LinusU/buffer-from#readme
3// Definitions by: Nat Burns <https://github.com/burnnat>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6/// <reference types="node" />
7
8declare function bufferFrom(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
9declare function bufferFrom(str: string, encoding?: string): Buffer;
10declare function bufferFrom(data: ReadonlyArray<any> | Buffer): Buffer;
11
12export = bufferFrom;