You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v3 close() returned Promise<void>. #1356 was just merged which turns it to Promise<void> | undefined, but this doesn't feel like the correct solution to me. The only way it can return undefined is if the user does watcher.closed = true followed by watcher.close().
Expected behavior
I don't think the user should be able to directly set watcher.closed as it skips all of the other cleanup. It also makes migration from v3 to v4 more difficult by changing the type signature of close()
Additional context
See #1356 and the issue it closed #1355 for more details. There was an unresolved question about this on the PR #1356 (comment), but unfortunately I didn't have a chance to chime in.
The text was updated successfully, but these errors were encountered:
Describe the bug
In v3
close()
returnedPromise<void>
. #1356 was just merged which turns it toPromise<void> | undefined
, but this doesn't feel like the correct solution to me. The only way it can returnundefined
is if the user doeswatcher.closed = true
followed bywatcher.close()
.Expected behavior
I don't think the user should be able to directly set
watcher.closed
as it skips all of the other cleanup. It also makes migration from v3 to v4 more difficult by changing the type signature ofclose()
Additional context
See #1356 and the issue it closed #1355 for more details. There was an unresolved question about this on the PR #1356 (comment), but unfortunately I didn't have a chance to chime in.
The text was updated successfully, but these errors were encountered: