Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find() errors on 0-argument overload #122

Open
Dimava opened this issue Jan 22, 2024 · 1 comment
Open

find() errors on 0-argument overload #122

Dimava opened this issue Jan 22, 2024 · 1 comment

Comments

@Dimava
Copy link

Dimava commented Jan 22, 2024

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
Copy link
Author

Dimava commented Jan 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant