unix-read.d.ts 529 B

12345678910111213141516
  1. import { read as fsRead } from 'fs';
  2. import { LinuxPortBinding } from './linux';
  3. import { DarwinPortBinding } from './darwin';
  4. declare const readAsync: typeof fsRead.__promisify__;
  5. interface UnixReadOptions {
  6. binding: LinuxPortBinding | DarwinPortBinding;
  7. buffer: Buffer;
  8. offset: number;
  9. length: number;
  10. fsReadAsync?: typeof readAsync;
  11. }
  12. export declare const unixRead: ({ binding, buffer, offset, length, fsReadAsync, }: UnixReadOptions) => Promise<{
  13. buffer: Buffer;
  14. bytesRead: number;
  15. }>;
  16. export {};