UNPKG

@haelp/teto

Version:

A typescript-based controllable TETR.IO client.

52 lines (51 loc) 1.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "pack", { enumerable: true, get: function() { return pack; } }); const _tswrap = require("./ts-wrap"); // require theorypack extensions (0, _tswrap.addExtension)({ Class: undefined, type: 1, read: (e)=>null === e ? { success: true } : { success: true, ...e } }); (0, _tswrap.addExtension)({ Class: undefined, type: 2, read: (e)=>null === e ? { success: false } : { success: false, error: e } }); const unpacker = new _tswrap.Unpackr({ int64AsType: "number", bundleStrings: true, sequential: false }); const packer = new _tswrap.Packr({ int64AsType: "number", bundleStrings: true, sequential: false }); (function(pack) { pack.unpack = unpacker.unpack.bind(unpacker); pack.unpackMultiple = unpacker.unpackMultiple.bind(unpacker); pack.decode = packer.decode.bind(unpacker); pack.pack = packer.pack.bind(packer); pack.encode = packer.encode.bind(packer); })(pack || (pack = {})); var pack; //# sourceMappingURL=index.js.map