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 24bea0e commit e7bf735Copy full SHA for e7bf735
internal/runtime/runtime.go
@@ -462,7 +462,7 @@ func Source(unsupportedJSFeatures compat.JSFeature) logger.Source {
462
// These are for the "using" statement in TypeScript 5.2+
463
export var __using = (stack, value, async) => {
464
if (value != null) {
465
- if (typeof value !== 'object') throw TypeError('Object expected')
+ if (typeof value !== 'object' && typeof value !== 'function') throw TypeError('Object expected')
466
var dispose
467
if (async) dispose = value[__knownSymbol('asyncDispose')]
468
if (dispose === void 0) dispose = value[__knownSymbol('dispose')]
0 commit comments