@shikijs/twoslash 3.8.1 → 3.9.1
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/core.mjs +6 -1
- package/package.json +8 -8
package/dist/core.mjs
CHANGED
|
@@ -639,6 +639,11 @@ function rendererRich(options = {}) {
|
|
|
639
639
|
if (!content || content === "any")
|
|
640
640
|
return [];
|
|
641
641
|
const popupContents = [];
|
|
642
|
+
let lang = this.options.lang;
|
|
643
|
+
if (lang === "jsx")
|
|
644
|
+
lang = "tsx";
|
|
645
|
+
else if (lang === "js" || lang === "javascript")
|
|
646
|
+
lang = "ts";
|
|
642
647
|
const typeCode = {
|
|
643
648
|
type: "element",
|
|
644
649
|
tagName: "code",
|
|
@@ -649,7 +654,7 @@ function rendererRich(options = {}) {
|
|
|
649
654
|
...this.options,
|
|
650
655
|
meta: {},
|
|
651
656
|
transformers: [],
|
|
652
|
-
lang
|
|
657
|
+
lang,
|
|
653
658
|
structure: content.trim().includes("\n") ? "classic" : "inline"
|
|
654
659
|
}
|
|
655
660
|
).children
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/twoslash",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.9.1",
|
|
5
5
|
"description": "Shiki transformer for twoslash",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"typescript": ">=5.5.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"twoslash": "^0.3.
|
|
39
|
-
"@shikijs/types": "3.
|
|
40
|
-
"@shikijs/core": "3.
|
|
38
|
+
"twoslash": "^0.3.3",
|
|
39
|
+
"@shikijs/types": "3.9.1",
|
|
40
|
+
"@shikijs/core": "3.9.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@iconify-json/carbon": "^1.2.
|
|
44
|
-
"@iconify-json/codicon": "^1.2.
|
|
43
|
+
"@iconify-json/carbon": "^1.2.11",
|
|
44
|
+
"@iconify-json/codicon": "^1.2.25",
|
|
45
45
|
"hast-util-from-html": "^2.0.3",
|
|
46
|
-
"typescript": "^5.
|
|
47
|
-
"@shikijs/twoslash": "3.
|
|
46
|
+
"typescript": "^5.9.2",
|
|
47
|
+
"@shikijs/twoslash": "3.9.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "unbuild",
|