@runtime-type-inspector/repl 3.2.3 → 3.2.4
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 +4 -0
- package/index.js +5 -1
- package/package.json +2 -2
- package/ts-morph.js +21765 -0
- package/ts-to-jsdoc-test.js +31 -0
- package/ts-to-jsdoc.js +460 -0
package/index.html
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
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
|
+
-->
|
|
6
9
|
<link rel="stylesheet" href="./node_modules/display-anything/src/DisplayAnything.css"></link>
|
|
7
10
|
</head>
|
|
8
11
|
<body>
|
|
@@ -15,6 +18,7 @@
|
|
|
15
18
|
<option value="jsdoc">Show parsed JSDoc</option>
|
|
16
19
|
<option value="expand-type">expandType</option>
|
|
17
20
|
<option value="eval">Eval</option>
|
|
21
|
+
<option value="ts-to-jsdoc">ts-to-jsdoc</option>
|
|
18
22
|
</select>
|
|
19
23
|
<button onclick="runAction()">Run action</button>
|
|
20
24
|
<select id="preferred-expand-type">
|
package/index.js
CHANGED
|
@@ -216,7 +216,11 @@ function actionAST() {
|
|
|
216
216
|
}
|
|
217
217
|
function actionAST_TS() {
|
|
218
218
|
const str = getLeft();
|
|
219
|
-
const ast = ts.createSourceFile('repl.ts', str,
|
|
219
|
+
const ast = ts.createSourceFile('repl.ts', str, {
|
|
220
|
+
languageVersion: ts.ScriptTarget.Latest,
|
|
221
|
+
setParentNodes: false,
|
|
222
|
+
jsDocParsingMode: ts.JSDocParsingMode.ParseAll,
|
|
223
|
+
});
|
|
220
224
|
const out = JSON.stringify(ast, function(name, val) {
|
|
221
225
|
if (name === "parent") {
|
|
222
226
|
return undefined; // remove
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtime-type-inspector/repl",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
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.
|
|
12
|
+
"@runtime-type-inspector/transpiler": "^3.2.4",
|
|
13
13
|
"ace-builds": "^1.28.0",
|
|
14
14
|
"display-anything": "^1.1.0",
|
|
15
15
|
"express": "^4.18.2"
|