In #180, the [Symbol.dispose] method is wrapped when hint is 'async-dispose', even if the method is undefined. This bypasses the outer check in CreateDisposableResource, where it would typically trigger a TypeError for undefined method. I find this behavior unexpected, as the original issue #179 did not intend to alter the behavior of await using / AsyncDisposableStack.use in a way that it would no longer throw errors for non-disposable values before usage but only when disposing.
In #180, the
[Symbol.dispose]method is wrapped when hint is 'async-dispose', even if the method isundefined. This bypasses the outer check in CreateDisposableResource, where it would typically trigger a TypeError forundefinedmethod. I find this behavior unexpected, as the original issue #179 did not intend to alter the behavior ofawait using/AsyncDisposableStack.usein a way that it would no longer throw errors for non-disposable values before usage but only when disposing.