UNPKG

@wapython/wasi

Version:

Javascript library for interacting with WASI Modules in Node.js and the Browser.

52 lines 2.11 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.WASIKillError = exports.WASIExitError = exports.WASIError = void 0; var WASIError = /** @class */ (function (_super) { __extends(WASIError, _super); function WASIError(errno) { var _this = _super.call(this) || this; _this.errno = errno; Object.setPrototypeOf(_this, WASIError.prototype); return _this; } return WASIError; }(Error)); exports.WASIError = WASIError; var WASIExitError = /** @class */ (function (_super) { __extends(WASIExitError, _super); function WASIExitError(code) { var _this = _super.call(this, "WASI Exit error: ".concat(code)) || this; _this.code = code; Object.setPrototypeOf(_this, WASIExitError.prototype); return _this; } return WASIExitError; }(Error)); exports.WASIExitError = WASIExitError; var WASIKillError = /** @class */ (function (_super) { __extends(WASIKillError, _super); function WASIKillError(signal) { var _this = _super.call(this, "WASI Kill signal: ".concat(signal)) || this; _this.signal = signal; Object.setPrototypeOf(_this, WASIKillError.prototype); return _this; } return WASIKillError; }(Error)); exports.WASIKillError = WASIKillError; //# sourceMappingURL=types.js.map