json-as 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -105,5 +105,5 @@ describe("Ser/de Objects", () => {
105
105
  y: 1.2
106
106
  })
107
107
  })
108
-
108
+
109
109
  })
package/assembly/json.ts CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  tCode,
19
19
  uCode,
20
20
  } from "./chars";
21
- import { removeWhitespace, unsafeCharCodeAt } from "./util";
21
+ import { unsafeCharCodeAt } from "./util";
22
22
 
23
23
  /**
24
24
  * JSON Encoder/Decoder for AssemblyScript
@@ -299,7 +299,7 @@ export class JSON {
299
299
  }
300
300
  }
301
301
  // @ts-ignore
302
- const deserialized = schema!.__JSON_Deserialize<T>(result);
302
+ const deserialized = changetype<nonnull<T>>(schema).__JSON_Deserialize<T>(result)
303
303
  heap.free(changetype<usize>(schema));
304
304
  return deserialized;
305
305
  }
package/assembly/test.ts CHANGED
@@ -2,7 +2,6 @@ import "wasi";
2
2
  import {
3
3
  JSON
4
4
  } from ".";
5
- import { parseObject } from "./json";
6
5
 
7
6
  // @ts-ignore
8
7
  @json
package/assembly/type.ts CHANGED
@@ -3,6 +3,9 @@ export class Type<T> {
3
3
  public value: any;
4
4
  constructor(value: T) {
5
5
  this.value = value;
6
+ }
7
+ set(data: any) {
8
+
6
9
  }
7
10
  static from<T>(value: T): Type<T> {
8
11
  return new Type<T>(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-as",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "JSON encoder/decoder for AssemblyScript",
5
5
  "types": "assembly/index.ts",
6
6
  "author": "Jairus Tanaka",
@@ -25,6 +25,7 @@
25
25
  "@serial-as/json": "^2.0.0",
26
26
  "assemblyscript": "^0.20.7",
27
27
  "assemblyscript-prettier": "^1.0.2",
28
+ "prettier": "^2.7.1",
28
29
  "typescript": "^4.7.2"
29
30
  },
30
31
  "dependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-as/transform",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "JSON encoder/decoder for AssemblyScript",
5
5
  "main": "./lib/index.js",
6
6
  "author": "Jairus Tanaka",