Skip to content

Commit

Permalink
fix #3390: allow using disposable functions (#3391)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiro authored Sep 16, 2023
1 parent 24bea0e commit e7bf735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ func Source(unsupportedJSFeatures compat.JSFeature) logger.Source {
// These are for the "using" statement in TypeScript 5.2+
export var __using = (stack, value, async) => {
if (value != null) {
if (typeof value !== 'object') throw TypeError('Object expected')
if (typeof value !== 'object' && typeof value !== 'function') throw TypeError('Object expected')
var dispose
if (async) dispose = value[__knownSymbol('asyncDispose')]
if (dispose === void 0) dispose = value[__knownSymbol('dispose')]
Expand Down

0 comments on commit e7bf735

Please sign in to comment.