toilscript 0.1.34 → 0.1.36

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.34";
1
+ var ASSEMBLYSCRIPT_VERSION = "0.1.36";
2
2
  var ASSEMBLYSCRIPT_IMPORTMAP = {
3
3
  "imports": {
4
- "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.34/dist/toilscript.js",
5
- "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.34/dist/cli.js",
4
+ "toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.36/dist/toilscript.js",
5
+ "toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.36/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.34",
11
+ "version": "0.1.36",
12
12
  "author": "Daniel Wirtz <dcode+assemblyscript@dcode.io>",
13
13
  "license": "Apache-2.0",
14
14
  "homepage": "https://github.com/dacely-cloud/toilscript",
package/std/ts-plugin.cjs CHANGED
@@ -235,6 +235,15 @@ function init(modules) {
235
235
  node.members.forEach((m) => {
236
236
  if (!ts.isPropertyDeclaration(m) || !declHasDecorator(m, 'collection')) return;
237
237
  if (!m.type || !m.name || !ts.isIdentifier(m.name)) return;
238
+ // A `static` @collection field is ALREADY a static member of the class, so
239
+ // synthesizing a namespace const for it duplicates the name (TS2300). Only
240
+ // the legacy instance (type-carrier) form needs the synthesized static
241
+ // handle; the static form type-checks `Db.coll` on its own (no plugin).
242
+ const mods =
243
+ ts.getModifiers && ts.canHaveModifiers && ts.canHaveModifiers(m)
244
+ ? ts.getModifiers(m)
245
+ : m.modifiers;
246
+ if (mods && mods.some((mod) => mod.kind === ts.SyntaxKind.StaticKeyword)) return;
238
247
  consts += ` const ${m.name.text}: ${m.type.getText(sf)};\n`;
239
248
  });
240
249
  if (consts) {