mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
39 lines
708 B
TypeScript
39 lines
708 B
TypeScript
// Loaded from https://raw.githubusercontent.com/denjucks/dex/master/lib/deps/tarn@3.0.0/dist/PromiseInspection.dew.js
|
|
|
|
|
|
var exports = {},
|
|
_dewExec = false;
|
|
export function dew() {
|
|
if (_dewExec) return exports;
|
|
_dewExec = true;
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
|
|
class PromiseInspection {
|
|
constructor(args) {
|
|
this._value = args.value;
|
|
this._error = args.error;
|
|
}
|
|
|
|
value() {
|
|
return this._value;
|
|
}
|
|
|
|
reason() {
|
|
return this._error;
|
|
}
|
|
|
|
isRejected() {
|
|
return !!this._error;
|
|
}
|
|
|
|
isFulfilled() {
|
|
return !!this._value;
|
|
}
|
|
|
|
}
|
|
|
|
exports.PromiseInspection = PromiseInspection;
|
|
return exports;
|
|
} |