| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -294,7 +294,7 @@ export function __classPrivateFieldIn(state, receiver) { | |||
| 294 | 294 | ||
| 295 | 295 | export function __addDisposableResource(env, value, async) { | |
| 296 | 296 | if (value !== null && value !== void 0) { | |
| 297 | - if (typeof value !== "object") throw new TypeError("Object expected."); | ||
| 297 | + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); | ||
| 298 | 298 | var dispose; | |
| 299 | 299 | if (async) { | |
| 300 | 300 | if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -294,7 +294,7 @@ export function __classPrivateFieldIn(state, receiver) { | |||
| 294 | 294 | ||
| 295 | 295 | export function __addDisposableResource(env, value, async) { | |
| 296 | 296 | if (value !== null && value !== void 0) { | |
| 297 | - if (typeof value !== "object") throw new TypeError("Object expected."); | ||
| 297 | + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); | ||
| 298 | 298 | var dispose; | |
| 299 | 299 | if (async) { | |
| 300 | 300 | if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -342,7 +342,7 @@ var __disposeResources; | |||
| 342 | 342 | ||
| 343 | 343 | __addDisposableResource = function (env, value, async) { | |
| 344 | 344 | if (value !== null && value !== void 0) { | |
| 345 | - if (typeof value !== "object") throw new TypeError("Object expected."); | ||
| 345 | + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); | ||
| 346 | 346 | var dispose; | |
| 347 | 347 | if (async) { | |
| 348 | 348 | if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments