DefinitelyTyped/types/buffer-from/index.d.ts
2018-06-16 12:58:41 +00:00

13 lines
519 B
TypeScript

// Type definitions for buffer-from 1.1
// Project: https://github.com/LinusU/buffer-from#readme
// Definitions by: Nat Burns <https://github.com/burnnat>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
declare function bufferFrom(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
declare function bufferFrom(str: string, encoding?: string): Buffer;
declare function bufferFrom(data: ReadonlyArray<any> | Buffer): Buffer;
export = bufferFrom;