CoolFace
Apppublic

opusdev/vector-similarity-api

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
index.d.ts44 linesDownload Raw Back to readdirp
1// TypeScript Version: 3.22 3/// <reference types="node" lib="esnext" />4 5import * as fs from 'fs';6import { Readable } from 'stream';7 8declare namespace readdir {9  interface EntryInfo {10    path: string;11    fullPath: string;12    basename: string;13    stats?: fs.Stats;14    dirent?: fs.Dirent;15  }16 17  interface ReaddirpOptions {18    root?: string;19    fileFilter?: string | string[] | ((entry: EntryInfo) => boolean);20    directoryFilter?: string | string[] | ((entry: EntryInfo) => boolean);21    type?: 'files' | 'directories' | 'files_directories' | 'all';22    lstat?: boolean;23    depth?: number;24    alwaysStat?: boolean;25  }26 27  interface ReaddirpStream extends Readable, AsyncIterable<EntryInfo> {28    read(): EntryInfo;29    [Symbol.asyncIterator](): AsyncIterableIterator<EntryInfo>;30  }31 32  function promise(33    root: string,34    options?: ReaddirpOptions35  ): Promise<EntryInfo[]>;36}37 38declare function readdir(39  root: string,40  options?: readdir.ReaddirpOptions41): readdir.ReaddirpStream;42 43export = readdir;44