-
-
Notifications
You must be signed in to change notification settings - Fork 140
Support throwIfNoEntry in StatOptions
#782
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
Support throwIfNoEntry in StatOptions
#782
Conversation
24f86cc to
23aa210
Compare
This option is available since node v14 and is quite useful
23aa210 to
80cf803
Compare
throwIfNoEntry: false in StatOptionsthrowIfNoEntry in StatOptions
streamich
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
| lstatSync(path: PathLike): Stats<number>; | ||
| lstatSync(path: PathLike, options: { bigint: false }): Stats<number>; | ||
| lstatSync(path: PathLike, options: { bigint: true }): Stats<bigint>; | ||
| lstatSync(path: PathLike, options?: IStatOptions): Stats { | ||
| return this.lstatBase(pathToFilename(path), getStatOptions(options).bigint as any); | ||
| lstatSync(path: PathLike, options: { throwIfNoEntry?: true | undefined }): Stats<number>; | ||
| lstatSync(path: PathLike, options: { bigint: false; throwIfNoEntry?: true | undefined }): Stats<number>; | ||
| lstatSync(path: PathLike, options: { bigint: true; throwIfNoEntry?: true | undefined }): Stats<bigint>; | ||
| lstatSync(path: PathLike, options: { throwIfNoEntry: false }): Stats<number> | undefined; | ||
| lstatSync(path: PathLike, options: { bigint: false; throwIfNoEntry: false }): Stats<number> | undefined; | ||
| lstatSync(path: PathLike, options: { bigint: true; throwIfNoEntry: false }): Stats<bigint> | undefined; | ||
| lstatSync(path: PathLike, options?: IStatOptions): Stats | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like these type overloads are slowly getting out of control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! 😅
Should probably be revised if a future version of NodeJS ships with new options.
|
🎉 This PR is included in version 3.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
Fantastic. Thanks for your quick review! 👍 |
This PR solves #781