We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
using
1 parent 22f0818 commit 3df56c7Copy full SHA for 3df56c7
internal/runtime/runtime.go
@@ -455,7 +455,7 @@ func Source(unsupportedJSFeatures compat.JSFeature) logger.Source {
455
// These are for the "using" statement in TypeScript 5.2+
456
export var __using = (stack, value, async) => {
457
if (value != null) {
458
- if (typeof value !== 'object') throw TypeError('Object expected')
+ if (typeof value !== 'object' && typeof value !== 'function') throw TypeError('Object expected')
459
var dispose
460
if (async) dispose = value[__knownSymbol('asyncDispose')]
461
if (dispose === void 0) dispose = value[__knownSymbol('dispose')]
0 commit comments