buffer.d.ts 642 B

123456789101112131415
  1. /// <reference types="node" />
  2. import { Buffer } from 'buffer';
  3. declare const bufferAllocUnsafe: (size: number) => Buffer;
  4. declare const bufferFrom: {
  5. (arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number | undefined, length?: number | undefined): Buffer;
  6. (data: readonly any[]): Buffer;
  7. (data: Uint8Array): Buffer;
  8. (obj: {
  9. valueOf(): string | object;
  10. } | {
  11. [Symbol.toPrimitive](hint: "string"): string;
  12. }, byteOffset?: number | undefined, length?: number | undefined): Buffer;
  13. (str: string, encoding?: string | undefined): Buffer;
  14. };
  15. export { Buffer, bufferAllocUnsafe, bufferFrom };