toilscript 0.1.35 → 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/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/importmap.json +2 -2
- package/dist/web.js +3 -3
- package/package.json +1 -1
- package/std/ts-plugin.cjs +9 -0
package/dist/importmap.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"imports": {
|
|
3
|
-
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
4
|
-
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
3
|
+
"toilscript": "https://cdn.jsdelivr.net/npm/toilscript@0.1.36/dist/toilscript.js",
|
|
4
|
+
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.36/dist/cli.js",
|
|
5
5
|
"binaryen": "https://cdn.jsdelivr.net/npm/binaryen@130.0.0-nightly.20260609/index.js",
|
|
6
6
|
"long": "https://cdn.jsdelivr.net/npm/long@5.3.2/index.js"
|
|
7
7
|
}
|
package/dist/web.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var ASSEMBLYSCRIPT_VERSION = "0.1.
|
|
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.
|
|
5
|
-
"toilscript/cli": "https://cdn.jsdelivr.net/npm/toilscript@0.1.
|
|
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
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) {
|