Comparing version
@@ -131,3 +131,3 @@ import { u128, u128Safe, u256, u256Safe, i128, i128Safe } from "as-bignum/assembly"; | ||
} else { | ||
throw new Error(`Could not serialize data of type ${nameof<T>()}. Invalid data provided.`); | ||
throw new Error(`Could not serialize data of type ${nameof<T>()}. Make sure to add the correct decorators to classes.`); | ||
} | ||
@@ -169,3 +169,3 @@ } | ||
// @ts-ignore | ||
throw new Error(`Could not deserialize data ${data} to type ${nameof<T>()}. Invalide data provided.`); | ||
throw new Error(`Could not deserialize data ${data} to type ${nameof<T>()}. Make sure to add the correct decorators to classes.`); | ||
} | ||
@@ -199,4 +199,3 @@ } | ||
// @ts-ignore | ||
//return null; | ||
throw new Error(`Could not deserialize data ${data} to type ${nameof<T>()}. Invalide data provided.`) | ||
throw new Error(`Could not deserialize data ${data} to type ${nameof<T>()}. Make sure to add the correct decorators to classes.`) | ||
} | ||
@@ -203,0 +202,0 @@ } |
@@ -70,3 +70,3 @@ import { StringSink } from "as-string-sink/assembly"; | ||
// @ts-ignore | ||
if (isArray<T>()) { | ||
if (!isArray<T>()) { | ||
return 0; | ||
@@ -81,2 +81,2 @@ // @ts-ignore | ||
} | ||
} | ||
} |
{ | ||
"name": "json-as", | ||
"version": "0.5.23", | ||
"version": "0.5.24", | ||
"description": "JSON encoder/decoder for AssemblyScript", | ||
@@ -5,0 +5,0 @@ "types": "assembly/index.ts", |
{ | ||
"name": "@json-as/transform", | ||
"version": "0.5.23", | ||
"version": "0.5.24", | ||
"description": "JSON encoder/decoder for AssemblyScript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
65361
0.09%