0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-28 14:33:11 +01:00
nodejs/typings/internalBinding/fs_dir.d.ts
1ilsang 3c50297e9e
typings: apply lint
PR-URL: https://github.com/nodejs/node/pull/54065
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-07-29 21:19:58 +00:00

24 lines
823 B
TypeScript

import { InternalFSBinding } from './fs';
declare namespace InternalFSDirBinding {
import FSReqCallback = InternalFSBinding.FSReqCallback;
type Buffer = Uint8Array;
type StringOrBuffer = string | Buffer;
class DirHandle {
read(encoding: string, bufferSize: number, callback: FSReqCallback): string[] | undefined;
read(encoding: string, bufferSize: number): string[] | undefined;
close(callback: FSReqCallback): void;
close(): void;
}
function opendir(path: StringOrBuffer, encoding: string, req: FSReqCallback): DirHandle;
function opendir(path: StringOrBuffer, encoding: string): DirHandle;
function opendirSync(path: StringOrBuffer): DirHandle;
}
export interface FsDirBinding {
opendir: typeof InternalFSDirBinding.opendir;
opendirSync: typeof InternalFSDirBinding.opendirSync;
}