Comparing version 0.1.0-rc.17 to 0.1.0-rc.18
@@ -62,5 +62,6 @@ "use strict"; | ||
function doAbiEncode(schema, obj, encoder, parentTy) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e, _f; | ||
function throwUnexpectedType() { | ||
const got = obj === null ? 'null' : obj.constructor.name; | ||
var _a; | ||
const got = obj === null ? 'null' : (_a = obj.name) !== null && _a !== void 0 ? _a : obj.constructor.name; | ||
const schemaStr = stringifySchema(schema); | ||
@@ -132,3 +133,5 @@ const expected = typeof parentTy !== 'undefined' ? parentTy(schemaStr) : schemaStr; | ||
let entries; | ||
if (obj instanceof Map || obj instanceof types_1.OasisMap) { | ||
if (obj instanceof Map || | ||
obj instanceof types_1.OasisMap || | ||
(obj && ((_a = obj === null || obj === void 0 ? void 0 : obj.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'OasisMap')) { | ||
entries = [...obj.entries()]; | ||
@@ -149,3 +152,5 @@ } | ||
let keys; | ||
if (obj instanceof Set || obj instanceof types_1.OasisSet) { | ||
if (obj instanceof Set || | ||
obj instanceof types_1.OasisSet || | ||
(obj && ((_b = obj === null || obj === void 0 ? void 0 : obj.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'OasisSet')) { | ||
keys = [...obj.keys()]; | ||
@@ -264,3 +269,3 @@ } | ||
/* istanbul ignore next */ | ||
throw new Error(`invalid object for schema: expected \`${(_d = (_b = (_a = schema) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : (_c = schema === null || schema === void 0 ? void 0 : schema.constructor) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : JSON.stringify(schema)}\`, but got \`${JSON.stringify(obj)}\`.`); | ||
throw new Error(`invalid object for schema: expected \`${(_f = (_d = (_c = schema) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : (_e = schema === null || schema === void 0 ? void 0 : schema.constructor) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : JSON.stringify(schema)}\`, but got \`${JSON.stringify(obj)}\`.`); | ||
} | ||
@@ -267,0 +272,0 @@ } |
{ | ||
"name": "oasis-std", | ||
"version": "0.1.0-rc.17", | ||
"version": "0.1.0-rc.18", | ||
"description": "Oasis platform standard library", | ||
@@ -30,3 +30,3 @@ "license": "Apache-2.0", | ||
}, | ||
"gitHead": "3b0e88089012ce2fa296f60c0e3c8d7790250fe6" | ||
"gitHead": "53bfbac97735e25d36bc3e7a2883dba4ebcdffab" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
282573
1571