@runtime-type-inspector/repl 3.2.4 → 3.2.5

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/index.html CHANGED
@@ -3,9 +3,6 @@
3
3
  <script src="importmap.js"></script>
4
4
  <script src="node_modules/ace-builds/src/ace.js"></script>
5
5
  <script src="node_modules/typescript/lib/typescript.js"></script>
6
- <!--
7
- <script src="node_modules/ts-morph/dist/ts-morph.js"></script>
8
- -->
9
6
  <link rel="stylesheet" href="./node_modules/display-anything/src/DisplayAnything.css"></link>
10
7
  </head>
11
8
  <body>
@@ -18,7 +15,6 @@
18
15
  <option value="jsdoc">Show parsed JSDoc</option>
19
16
  <option value="expand-type">expandType</option>
20
17
  <option value="eval">Eval</option>
21
- <option value="ts-to-jsdoc">ts-to-jsdoc</option>
22
18
  </select>
23
19
  <button onclick="runAction()">Run action</button>
24
20
  <select id="preferred-expand-type">
package/index.js CHANGED
@@ -216,11 +216,7 @@ function actionAST() {
216
216
  }
217
217
  function actionAST_TS() {
218
218
  const str = getLeft();
219
- const ast = ts.createSourceFile('repl.ts', str, {
220
- languageVersion: ts.ScriptTarget.Latest,
221
- setParentNodes: false,
222
- jsDocParsingMode: ts.JSDocParsingMode.ParseAll,
223
- });
219
+ const ast = ts.createSourceFile('repl.ts', str, ts.ScriptTarget.Latest, false /*setParentNodes*/);
224
220
  const out = JSON.stringify(ast, function(name, val) {
225
221
  if (name === "parent") {
226
222
  return undefined; // remove
@@ -279,7 +275,9 @@ function actionJSDoc() {
279
275
  setRight(out);
280
276
  }
281
277
  function actionTypeChecking() {
282
- setRight(addTypeChecks(getLeft(), {expandType: getPreferredExpandType()}));
278
+ const expandType = getPreferredExpandType();
279
+ const filename = 'repl.js';
280
+ setRight(addTypeChecks(getLeft(), {expandType, filename}));
283
281
  }
284
282
  /**
285
283
  * @todo use Monaco Diff Editor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtime-type-inspector/repl",
3
- "version": "3.2.4",
3
+ "version": "3.2.5",
4
4
  "description": "REPL of RuntimeTypeInspector.js",
5
5
  "main": "index.html",
6
6
  "author": "Hermann Rolfes (kungfooman)",
@@ -9,7 +9,7 @@
9
9
  "access": "public"
10
10
  },
11
11
  "dependencies": {
12
- "@runtime-type-inspector/transpiler": "^3.2.4",
12
+ "@runtime-type-inspector/transpiler": "^3.2.5",
13
13
  "ace-builds": "^1.28.0",
14
14
  "display-anything": "^1.1.0",
15
15
  "express": "^4.18.2"