using.js 595 B

123456789101112
  1. function _using(o, n, e) {
  2. if (null == n) return n;
  3. if (Object(n) !== n) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
  4. if (e) var r = n[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
  5. if (null == r && (r = n[Symbol.dispose || Symbol["for"]("Symbol.dispose")]), "function" != typeof r) throw new TypeError("Property [Symbol.dispose] is not a function.");
  6. return o.push({
  7. v: n,
  8. d: r,
  9. a: e
  10. }), n;
  11. }
  12. module.exports = _using, module.exports.__esModule = true, module.exports["default"] = module.exports;