swc/bundler/tests/.cache/untrusted/c86cabbe4f68e530c72082c45c4a7ade9cd6155c.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

37 lines
806 B
TypeScript

// Loaded from https://raw.githubusercontent.com/denjucks/dex/master/lib/deps/tarn@3.0.0/dist/Resource.dew.js
import { dew as _utilsDewDew } from "./utils.dew.js";
var exports = {},
_dewExec = false;
export function dew() {
if (_dewExec) return exports;
_dewExec = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
const utils_1 = _utilsDewDew();
class Resource {
constructor(resource) {
this.resource = resource;
this.resource = resource;
this.timestamp = utils_1.now();
this.deferred = utils_1.defer();
}
get promise() {
return this.deferred.promise;
}
resolve() {
this.deferred.resolve(undefined);
return new Resource(this.resource);
}
}
exports.Resource = Resource;
return exports;
}