@mintplayer/polyglot-target-typescript 0.6.0 → 0.7.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/polyglot-target-typescript",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "MintPlayer Polyglot TypeScript / JavaScript target — a pure-JSON language plugin (spec + emission rules + capabilities + std bindings) for the polyglot transpiler.",
5
5
  "keywords": [
6
6
  "polyglot",
@@ -94,6 +94,10 @@
94
94
  "mutable": "let $x",
95
95
  "const": "const $x"
96
96
  },
97
+ "localDeclTyped": {
98
+ "mutable": "let $x: $T",
99
+ "const": "const $x: $T"
100
+ },
97
101
  "yield": {
98
102
  "value": "yield $x;",
99
103
  "empty": "return;"
@@ -3051,10 +3055,11 @@
3051
3055
  },
3052
3056
  {
3053
3057
  "tmpl": [
3058
+ "(",
3054
3059
  {
3055
3060
  "type": "type.base"
3056
3061
  },
3057
- " | null"
3062
+ " | null)"
3058
3063
  ]
3059
3064
  }
3060
3065
  ],
@@ -3534,6 +3539,9 @@
3534
3539
  "Error.init": "new $T($0)",
3535
3540
  "Error.message": "$this.message",
3536
3541
  "Iterable.type": "Iterable<$0>",
3542
+ "Array.type": "$0[]",
3543
+ "Array.init": "[]",
3544
+ "Array.count": "$this.length",
3537
3545
  "i8.parse": "(Number.parseInt($0, 10) << 24 >> 24)",
3538
3546
  "i16.parse": "(Number.parseInt($0, 10) << 16 >> 16)",
3539
3547
  "i32.parse": "(Number.parseInt($0, 10) | 0)",