@runtime-type-inspector/transpiler 2.1.4 → 2.2.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.
Files changed (3) hide show
  1. package/index.cjs +20 -0
  2. package/index.mjs +20 -0
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -958,6 +958,23 @@
958
958
  out += ';';
959
959
  return out;
960
960
  }
961
+ }, {
962
+ key: "ClassPrivateProperty",
963
+ value: function ClassPrivateProperty(node) {
964
+ var static_ = node.static,
965
+ key = node.key,
966
+ value = node.value;
967
+ var out = this.spaces;
968
+ if (static_) {
969
+ out += 'static ';
970
+ }
971
+ out += this.toSource(key);
972
+ if (value) {
973
+ out += ' = ' + this.toSource(value);
974
+ }
975
+ out += ';';
976
+ return out;
977
+ }
961
978
  }, {
962
979
  key: "ContinueStatement",
963
980
  value: function ContinueStatement(node) {
@@ -2050,6 +2067,9 @@
2050
2067
  }
2051
2068
  return _defineProperty({}, paramName, parseJSDocSetter(lastComment.value, this.expandType));
2052
2069
  }
2070
+ if (lastComment.value.includes('@ignoreRTI')) {
2071
+ return;
2072
+ }
2053
2073
  return parseJSDoc(lastComment.value, this.expandType);
2054
2074
  }
2055
2075
  }
package/index.mjs CHANGED
@@ -648,6 +648,23 @@ class Stringifier {
648
648
  out += ';';
649
649
  return out;
650
650
  }
651
+ ClassPrivateProperty(node) {
652
+ const {
653
+ static: static_,
654
+ key,
655
+ value
656
+ } = node;
657
+ let out = this.spaces;
658
+ if (static_) {
659
+ out += 'static ';
660
+ }
661
+ out += this.toSource(key);
662
+ if (value) {
663
+ out += ' = ' + this.toSource(value);
664
+ }
665
+ out += ';';
666
+ return out;
667
+ }
651
668
  ContinueStatement(node) {
652
669
  const {
653
670
  label
@@ -1712,6 +1729,9 @@ class Asserter extends Stringifier {
1712
1729
  [paramName]: parseJSDocSetter(lastComment.value, this.expandType)
1713
1730
  };
1714
1731
  }
1732
+ if (lastComment.value.includes('@ignoreRTI')) {
1733
+ return;
1734
+ }
1715
1735
  return parseJSDoc(lastComment.value, this.expandType);
1716
1736
  }
1717
1737
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtime-type-inspector/transpiler",
3
- "version": "2.1.4",
3
+ "version": "2.2.0",
4
4
  "description": "Validating JSDoc types at runtime for high-quality types - Trust is good, control is better.",
5
5
  "main": "index.cjs",
6
6
  "module": "index.mjs",
@@ -18,7 +18,7 @@
18
18
  "homepage": "https://github.com/kungfooman/RuntimeTypeInspector.js#readme",
19
19
  "dependencies": {
20
20
  "@babel/core": "^7.2.0",
21
- "@runtime-type-inspector/runtime": "^2.0.10",
21
+ "@runtime-type-inspector/runtime": "^2.1.0",
22
22
  "typescript": "^5.1.6"
23
23
  },
24
24
  "files": [