source: imaps-frontend/node_modules/@nodelib/fs.walk/out/readers/async.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/// <reference types="node" />
2import { EventEmitter } from 'events';
3import * as fsScandir from '@nodelib/fs.scandir';
4import type Settings from '../settings';
5import type { Entry, Errno } from '../types';
6import Reader from './reader';
7declare type EntryEventCallback = (entry: Entry) => void;
8declare type ErrorEventCallback = (error: Errno) => void;
9declare type EndEventCallback = () => void;
10export default class AsyncReader extends Reader {
11 protected readonly _settings: Settings;
12 protected readonly _scandir: typeof fsScandir.scandir;
13 protected readonly _emitter: EventEmitter;
14 private readonly _queue;
15 private _isFatalError;
16 private _isDestroyed;
17 constructor(_root: string, _settings: Settings);
18 read(): EventEmitter;
19 get isDestroyed(): boolean;
20 destroy(): void;
21 onEntry(callback: EntryEventCallback): void;
22 onError(callback: ErrorEventCallback): void;
23 onEnd(callback: EndEventCallback): void;
24 private _pushToQueue;
25 private _worker;
26 private _handleError;
27 private _handleEntry;
28 private _emitEntry;
29}
30export {};
Note: See TracBrowser for help on using the repository browser.