mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 21:31:02 +00:00
1 line
6.5 KiB
Plaintext
1 line
6.5 KiB
Plaintext
{"dependencies":[{"name":"./Enum.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":18,"index":120},"end":{"line":4,"column":38,"index":140}}],"key":"M1T7/mipmQb/WvVHRnWvvYGgjuI=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Result = void 0;\n const Enum_js_1 = require(_dependencyMap[0], \"./Enum.js\");\n /**\n * @name Result\n * @description\n * A Result maps to the Rust Result type, that can either wrap a success or error value\n */\n class Result extends Enum_js_1.Enum {\n constructor(registry, Ok, Err, value) {\n // NOTE This is order-dependent, Ok (with index 0) needs to be first\n // eslint-disable-next-line sort-keys\n super(registry, {\n Ok,\n Err\n }, value);\n }\n static with(Types) {\n return class extends Result {\n constructor(registry, value) {\n super(registry, Types.Ok, Types.Err, value);\n }\n };\n }\n /**\n * @description Returns the wrapper Err value (if isErr)\n */\n get asErr() {\n if (!this.isErr) {\n throw new Error('Cannot extract Err value from Ok result, check isErr first');\n }\n return this.value;\n }\n /**\n * @description Returns the wrapper Ok value (if isOk)\n */\n get asOk() {\n if (!this.isOk) {\n throw new Error('Cannot extract Ok value from Err result, check isOk first');\n }\n return this.value;\n }\n /**\n * @description Checks if the Result has no value\n */\n get isEmpty() {\n return this.isOk && this.value.isEmpty;\n }\n /**\n * @description Checks if the Result wraps an Err value\n */\n get isErr() {\n return !this.isOk;\n }\n /**\n * @description Checks if the Result wraps an Ok value\n */\n get isOk() {\n return this.index === 0;\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n const Types = this._toRawStruct();\n return `Result<${Types.Ok},${Types.Err}>`;\n }\n }\n exports.Result = Result;\n});","lineCount":75,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"Result"],[7,16,3,14],[7,19,3,17],[7,24,3,22],[7,25,3,23],[8,2,4,0],[8,8,4,6,"Enum_js_1"],[8,17,4,15],[8,20,4,18,"require"],[8,27,4,25],[8,28,4,25,"_dependencyMap"],[8,42,4,25],[8,58,4,37],[8,59,4,38],[9,2,5,0],[10,0,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,2,10,0],[14,8,10,6,"Result"],[14,14,10,12],[14,23,10,21,"Enum_js_1"],[14,32,10,30],[14,33,10,31,"Enum"],[14,37,10,35],[14,38,10,36],[15,4,11,4,"constructor"],[15,15,11,15,"constructor"],[15,16,11,16,"registry"],[15,24,11,24],[15,26,11,26,"Ok"],[15,28,11,28],[15,30,11,30,"Err"],[15,33,11,33],[15,35,11,35,"value"],[15,40,11,40],[15,42,11,42],[16,6,12,8],[17,6,13,8],[18,6,14,8],[18,11,14,13],[18,12,14,14,"registry"],[18,20,14,22],[18,22,14,24],[19,8,14,26,"Ok"],[19,10,14,28],[20,8,14,30,"Err"],[21,6,14,34],[21,7,14,35],[21,9,14,37,"value"],[21,14,14,42],[21,15,14,43],[22,4,15,4],[23,4,16,4],[23,11,16,11,"with"],[23,15,16,15,"with"],[23,16,16,16,"Types"],[23,21,16,21],[23,23,16,23],[24,6,17,8],[24,13,17,15],[24,27,17,29,"Result"],[24,33,17,35],[24,34,17,36],[25,8,18,12,"constructor"],[25,19,18,23,"constructor"],[25,20,18,24,"registry"],[25,28,18,32],[25,30,18,34,"value"],[25,35,18,39],[25,37,18,41],[26,10,19,16],[26,15,19,21],[26,16,19,22,"registry"],[26,24,19,30],[26,26,19,32,"Types"],[26,31,19,37],[26,32,19,38,"Ok"],[26,34,19,40],[26,36,19,42,"Types"],[26,41,19,47],[26,42,19,48,"Err"],[26,45,19,51],[26,47,19,53,"value"],[26,52,19,58],[26,53,19,59],[27,8,20,12],[28,6,21,8],[28,7,21,9],[29,4,22,4],[30,4,23,4],[31,0,24,0],[32,0,25,0],[33,4,26,4],[33,8,26,8,"asErr"],[33,13,26,13,"asErr"],[33,14,26,13],[33,16,26,16],[34,6,27,8],[34,10,27,12],[34,11,27,13],[34,15,27,17],[34,16,27,18,"isErr"],[34,21,27,23],[34,23,27,25],[35,8,28,12],[35,14,28,18],[35,18,28,22,"Error"],[35,23,28,27],[35,24,28,28],[35,84,28,88],[35,85,28,89],[36,6,29,8],[37,6,30,8],[37,13,30,15],[37,17,30,19],[37,18,30,20,"value"],[37,23,30,25],[38,4,31,4],[39,4,32,4],[40,0,33,0],[41,0,34,0],[42,4,35,4],[42,8,35,8,"asOk"],[42,12,35,12,"asOk"],[42,13,35,12],[42,15,35,15],[43,6,36,8],[43,10,36,12],[43,11,36,13],[43,15,36,17],[43,16,36,18,"isOk"],[43,20,36,22],[43,22,36,24],[44,8,37,12],[44,14,37,18],[44,18,37,22,"Error"],[44,23,37,27],[44,24,37,28],[44,83,37,87],[44,84,37,88],[45,6,38,8],[46,6,39,8],[46,13,39,15],[46,17,39,19],[46,18,39,20,"value"],[46,23,39,25],[47,4,40,4],[48,4,41,4],[49,0,42,0],[50,0,43,0],[51,4,44,4],[51,8,44,8,"isEmpty"],[51,15,44,15,"isEmpty"],[51,16,44,15],[51,18,44,18],[52,6,45,8],[52,13,45,15],[52,17,45,19],[52,18,45,20,"isOk"],[52,22,45,24],[52,26,45,28],[52,30,45,32],[52,31,45,33,"value"],[52,36,45,38],[52,37,45,39,"isEmpty"],[52,44,45,46],[53,4,46,4],[54,4,47,4],[55,0,48,0],[56,0,49,0],[57,4,50,4],[57,8,50,8,"isErr"],[57,13,50,13,"isErr"],[57,14,50,13],[57,16,50,16],[58,6,51,8],[58,13,51,15],[58,14,51,16],[58,18,51,20],[58,19,51,21,"isOk"],[58,23,51,25],[59,4,52,4],[60,4,53,4],[61,0,54,0],[62,0,55,0],[63,4,56,4],[63,8,56,8,"isOk"],[63,12,56,12,"isOk"],[63,13,56,12],[63,15,56,15],[64,6,57,8],[64,13,57,15],[64,17,57,19],[64,18,57,20,"index"],[64,23,57,25],[64,28,57,30],[64,29,57,31],[65,4,58,4],[66,4,59,4],[67,0,60,0],[68,0,61,0],[69,4,62,4,"toRawType"],[69,13,62,13,"toRawType"],[69,14,62,13],[69,16,62,16],[70,6,63,8],[70,12,63,14,"Types"],[70,17,63,19],[70,20,63,22],[70,24,63,26],[70,25,63,27,"_toRawStruct"],[70,37,63,39],[70,38,63,40],[70,39,63,41],[71,6,64,8],[71,13,64,15],[71,23,64,25,"Types"],[71,28,64,30],[71,29,64,31,"Ok"],[71,31,64,33],[71,35,64,37,"Types"],[71,40,64,42],[71,41,64,43,"Err"],[71,44,64,46],[71,47,64,49],[72,4,65,4],[73,2,66,0],[74,2,67,0,"exports"],[74,9,67,7],[74,10,67,8,"Result"],[74,16,67,14],[74,19,67,17,"Result"],[74,25,67,23],[75,0,67,24],[75,3]],"functionMap":{"names":["<global>","Result","constructor","_with","<anonymous>","get__asErr","get__asOk","get__isEmpty","get__isErr","get__isOk","toRawType"],"mappings":"AAA;ACS;ICC;KDI;IEC;eCC;YFC;aEE;SDC;KFC;III;KJK;IKI;KLK;IMI;KNE;IOI;KPE;IQI;KRE;ISI;KTG;CDC"},"hasCjsExports":true},"type":"js/module"}]} |