toilscript 0.1.55 → 0.1.57

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.
package/dist/web.js CHANGED
@@ -1,8 +1,8 @@
1
- var ASSEMBLYSCRIPT_VERSION = "0.1.55";
1
+ var ASSEMBLYSCRIPT_VERSION = "0.1.57";
2
2
  var ASSEMBLYSCRIPT_IMPORTMAP = {
3
3
  "imports": {
4
- "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.55/dist/toilscript.js",
5
- "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.55/dist/cli.js",
4
+ "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.57/dist/toilscript.js",
5
+ "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.57/dist/cli.js",
6
6
  "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
7
7
  "long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
8
8
  }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "toilscript",
9
9
  "wasm"
10
10
  ],
11
- "version": "0.1.55",
11
+ "version": "0.1.57",
12
12
  "author": "Daniel Wirtz <dcode+assemblyscript@dcode.io>",
13
13
  "license": "Apache-2.0",
14
14
  "homepage": "https://github.com/dacely-cloud/toilscript",
@@ -26,6 +26,15 @@ declare function main(): void;
26
26
  */
27
27
  declare function data(target: Function): void;
28
28
 
29
+ /**
30
+ * Marks a FIELD of a `@data` (or `@user`) class as globally unique: the compiler
31
+ * emits a per-field uniqueness constraint into the collection catalog so the edge
32
+ * can enforce it on write (via the `Unique` family). Field-level, unlike the class
33
+ * decorators above; applied bare on a `string` or `Uint8Array` field
34
+ * (`@unique email: string;`). Arrays and nested `@data` fields are not supported.
35
+ */
36
+ declare function unique(target: Object, propertyKey: string | symbol): void;
37
+
29
38
  /**
30
39
  * Marks a function (free, or a method of an `@service` class) as a client-callable
31
40
  * RPC endpoint. The server build emits it onto the typed client `Server` surface.