szwacz / fs-jetpack

Better file system API for Node.js
MIT License
777 stars 41 forks source link

find() errors on 0-argument overload #122

Open Dimava opened 9 months ago

Dimava commented 9 months ago

Type definitions define find as

  find(options?: FindOptions): string[];

meaning there should be a valid

jp.find()

overload with 0 arguments

However, it crashes with

    throw new Error(
          ^

Error: Argument "path" passed to find([path], options) must be a string. Received undefined
Dimava commented 9 months ago

Considering how often I use just jp.find('.') I encounter this from time to time