From 5fe8ee63e6022a8e7d61adb38f24c5207b8a23ad Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Tue, 28 May 2024 12:13:51 +0200 Subject: [PATCH] fix(twoslash): nested code block rendering structure fix https://github.com/twoslashes/twoslash/issues/38 --- docs/components.d.ts | 2 +- packages/twoslash/src/renderer-rich.ts | 2 +- .../test/out/completion-end-multifile.ts.html | 8 +- .../test/out/completion-end-multifile.ts.json | 1706 +++--- .../twoslash/test/out/completion-end.ts.html | 24 +- .../twoslash/test/out/completion-end.ts.json | 4750 +++++++++-------- packages/twoslash/test/out/rich/no-icons.html | 12 +- .../src/renderer-floating-vue.ts | 2 +- packages/vitepress-twoslash/src/style.css | 15 +- .../test/out/completion-end-multifile.ts.json | 1808 ++++--- .../test/out/completion-end.ts.json | 4714 ++++++++-------- 11 files changed, 6866 insertions(+), 6177 deletions(-) diff --git a/docs/components.d.ts b/docs/components.d.ts index 08ab7972e..6309cd066 100644 --- a/docs/components.d.ts +++ b/docs/components.d.ts @@ -1,10 +1,10 @@ /* eslint-disable */ -/* prettier-ignore */ // @ts-nocheck // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} +/* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { Badges: typeof import('./.vitepress/components/Badges.vue')['default'] diff --git a/packages/twoslash/src/renderer-rich.ts b/packages/twoslash/src/renderer-rich.ts index 45e81563f..f183ae8a9 100644 --- a/packages/twoslash/src/renderer-rich.ts +++ b/packages/twoslash/src/renderer-rich.ts @@ -235,7 +235,7 @@ export function rendererRich(options: RendererRichOptions = {}): TwoslashRendere lang: (this.options.lang === 'tsx' || this.options.lang === 'jsx') ? 'tsx' : 'ts', - structure: 'inline', + structure: content.trim().includes('\n') ? 'classic' : 'inline', }, ).children as ElementContent[], } diff --git a/packages/twoslash/test/out/completion-end-multifile.ts.html b/packages/twoslash/test/out/completion-end-multifile.ts.html index 500d52703..0c1260c7f 100644 --- a/packages/twoslash/test/out/completion-end-multifile.ts.html +++ b/packages/twoslash/test/out/completion-end-multifile.ts.html @@ -1,9 +1,13 @@
import { const foo: "foo"foo } from './foo'
  
-type type Example = {
name: 'foo' | 'bar' | 'baz';
}
Example
= {
+type
type Example = {
+    name: 'foo' | 'bar' | 'baz';
+}
Example
= {
name: "foo" | "bar" | "baz"name: 'foo' | 'bar' | 'baz' } -const const example: Exampleexample: type Example = {
name: 'foo' | 'bar' | 'baz';
}
Example
= { name: "foo" | "bar" | "baz"name: 'foo' }
+const const example: Exampleexample:
type Example = {
+    name: 'foo' | 'bar' | 'baz';
+}
Example
= { name: "foo" | "bar" | "baz"name: 'foo' }
const example: Exampleexample.name: "foo" | "bar" | "baz"name === '
  • foo
  • bar
  • baz
\ No newline at end of file diff --git a/packages/twoslash/test/out/completion-end-multifile.ts.json b/packages/twoslash/test/out/completion-end-multifile.ts.json index c67f52318..255afe625 100644 --- a/packages/twoslash/test/out/completion-end-multifile.ts.json +++ b/packages/twoslash/test/out/completion-end-multifile.ts.json @@ -346,40 +346,407 @@ "children": [ { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, - { - "type": "element", - "tagName": "span", + "tagName": "pre", "properties": { - "style": "color:#5DA994" + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" }, "children": [ { - "type": "text", - "value": " Example" + "type": "element", + "tagName": "code", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": " Example" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] } ] - }, + } + ] + } + ] + }, + { + "type": "text", + "value": "Example" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "element", + "value": "name", + "tagName": "span", + "properties": { + "class": "twoslash-hover" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-container" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": { + "class": "twoslash-popup-code" + }, + "children": [ { "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#80A665" }, "children": [ { "type": "text", - "value": " =" + "value": "name" } ] }, @@ -392,26 +759,20 @@ "children": [ { "type": "text", - "value": " {" + "value": ":" } ] }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, { "type": "element", "tagName": "span", "properties": { - "style": "color:#BD976A" + "style": "color:#C98A7D99" }, "children": [ { "type": "text", - "value": " name" + "value": " \"" } ] }, @@ -419,12 +780,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": ": " + "value": "foo" } ] }, @@ -437,7 +798,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -445,12 +806,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": "foo" + "value": " |" } ] }, @@ -463,7 +824,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -471,12 +832,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": " | " + "value": "bar" } ] }, @@ -489,7 +850,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -497,12 +858,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": "bar" + "value": " |" } ] }, @@ -515,7 +876,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -523,12 +884,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": " | " + "value": "baz" } ] }, @@ -541,65 +902,7 @@ "children": [ { "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" + "value": "\"" } ] } @@ -609,7 +912,7 @@ }, { "type": "text", - "value": "Example" + "value": "name" } ] } @@ -624,7 +927,46 @@ "children": [ { "type": "text", - "value": " =" + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" } ] }, @@ -637,7 +979,98 @@ "children": [ { "type": "text", - "value": " {" + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" } ] } @@ -658,12 +1091,64 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#BD976A" + "style": "color:#666666" }, "children": [ { "type": "text", - "value": " " + "value": "}" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#DBD7CAEE" + }, + "children": [ + { + "type": "text", + "value": " " + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "const " } ] }, @@ -676,7 +1161,7 @@ "children": [ { "type": "element", - "value": "name", + "value": "example", "tagName": "span", "properties": { "class": "twoslash-hover" @@ -700,12 +1185,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#80A665" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": "name" + "value": "const " } ] }, @@ -713,12 +1198,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#BD976A" }, "children": [ { "type": "text", - "value": ":" + "value": "example" } ] }, @@ -726,129 +1211,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D99" + "style": "color:#666666" }, "children": [ { "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" + "value": ": " } ] }, @@ -856,12 +1224,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D99" + "style": "color:#5DA994" }, "children": [ { "type": "text", - "value": "\"" + "value": "Example" } ] } @@ -871,7 +1239,7 @@ }, { "type": "text", - "value": "name" + "value": "example" } ] } @@ -894,334 +1262,7 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - } - ] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] - } - ] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#DBD7CAEE" - }, - "children": [ - { - "type": "text", - "value": " " - } - ] - } - ] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "element", - "value": "example", - "tagName": "span", - "properties": { - "class": "twoslash-hover" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-container" - }, - "children": [ - { - "type": "element", - "tagName": "code", - "properties": { - "class": "twoslash-popup-code" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "example" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Example" - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "example" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" + "style": "color:#5DA994" }, "children": [ { @@ -1248,260 +1289,301 @@ "children": [ { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": " Example" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " =" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " {" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", + "tagName": "pre", "properties": { - "style": "color:#BD976A" + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" }, "children": [ { - "type": "text", - "value": " name" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" + "type": "element", + "tagName": "code", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": " Example" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] } ] } diff --git a/packages/twoslash/test/out/completion-end.ts.html b/packages/twoslash/test/out/completion-end.ts.html index 16c542991..883bc33cf 100644 --- a/packages/twoslash/test/out/completion-end.ts.html +++ b/packages/twoslash/test/out/completion-end.ts.html @@ -1,20 +1,32 @@
var console: Consoleconsole.e
  • error
-const const a: {
test: 'foo' | 'bar' | 'baz';
}
a
: { test: "foo" | "bar" | "baz"test: 'foo' | 'bar' | 'baz' } = {
+const
const a: {
+    test: 'foo' | 'bar' | 'baz';
+}
a
: { test: "foo" | "bar" | "baz"test: 'foo' | 'bar' | 'baz' } = {
test: "foo" | "bar" | "baz"test: 'foo' } -const a: {
test: 'foo' | 'bar' | 'baz';
}
a
.t
  • test
+
const a: {
+    test: 'foo' | 'bar' | 'baz';
+}
a
.t
  • test
-const a: {
test: 'foo' | 'bar' | 'baz';
}
a
.test: "foo" | "bar" | "baz"test === '
  • foo
  • bar
  • baz
+
const a: {
+    test: 'foo' | 'bar' | 'baz';
+}
a
.test: "foo" | "bar" | "baz"test === '
  • foo
  • bar
  • baz
-const a: {
test: 'foo' | 'bar' | 'baz';
}
a
.test: "foo" | "bar" | "baz"test === 'b
  • bar
  • baz
+
const a: {
+    test: 'foo' | 'bar' | 'baz';
+}
a
.test: "foo" | "bar" | "baz"test === 'b
  • bar
  • baz
-const a: {
test: 'foo' | 'bar' | 'baz';
}
a
.test: "foo" | "bar" | "baz"test === 'b
  • bar
  • baz
ar'
+
const a: {
+    test: 'foo' | 'bar' | 'baz';
+}
a
.test: "foo" | "bar" | "baz"test === 'b
  • bar
  • baz
ar'
-const a: {
test: 'foo' | 'bar' | 'baz';
}
a
.test: "foo" | "bar" | "baz"test === '
  • foo
  • bar
  • baz
bar'
+
const a: {
+    test: 'foo' | 'bar' | 'baz';
+}
a
.test: "foo" | "bar" | "baz"test === '
  • foo
  • bar
  • baz
bar'
\ No newline at end of file diff --git a/packages/twoslash/test/out/completion-end.ts.json b/packages/twoslash/test/out/completion-end.ts.json index c7de6078c..558e49f2e 100644 --- a/packages/twoslash/test/out/completion-end.ts.json +++ b/packages/twoslash/test/out/completion-end.ts.json @@ -338,59 +338,355 @@ "children": [ { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, - { - "type": "element", - "tagName": "span", + "tagName": "pre", "properties": { - "style": "color:#666666" + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" }, "children": [ { - "type": "text", - "value": ": {" + "type": "element", + "tagName": "code", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] } ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, + } + ] + } + ] + }, + { + "type": "text", + "value": "a" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": { " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "element", + "value": "test", + "tagName": "span", + "properties": { + "class": "twoslash-hover" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-container" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": { + "class": "twoslash-popup-code" + }, + "children": [ { "type": "element", "tagName": "span", "properties": { - "style": "color:#BD976A" + "style": "color:#80A665" }, "children": [ { "type": "text", - "value": " test" + "value": "test" } ] }, @@ -403,7 +699,7 @@ "children": [ { "type": "text", - "value": ": " + "value": ":" } ] }, @@ -416,7 +712,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -442,7 +738,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -450,12 +746,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": " | " + "value": " |" } ] }, @@ -468,7 +764,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -494,7 +790,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -502,12 +798,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": " | " + "value": " |" } ] }, @@ -520,7 +816,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -546,39 +842,7 @@ "children": [ { "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" + "value": "\"" } ] } @@ -588,230 +852,7 @@ }, { "type": "text", - "value": "a" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": { " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "element", - "value": "test", - "tagName": "span", - "properties": { - "class": "twoslash-hover" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-container" - }, - "children": [ - { - "type": "element", - "tagName": "code", - "properties": { - "class": "twoslash-popup-code" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "test" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "test" + "value": "test" } ] } @@ -1357,1713 +1398,288 @@ "children": [ { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, - { - "type": "element", - "tagName": "span", + "tagName": "pre", "properties": { - "style": "color:#666666" + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " test" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "a" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "." - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "element", - "value": "t", - "tagName": "span", - "properties": {}, - "children": [ - { - "type": "text", - "value": "t" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completion-cursor" - }, - "children": [ - { - "type": "element", - "tagName": "ul", - "properties": { - "class": "twoslash-completion-list" - }, - "children": [ - { - "type": "element", - "tagName": "li", - "properties": {}, "children": [ { "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-icon completions-property" - }, + "tagName": "code", + "properties": {}, "children": [ { "type": "element", - "tagName": "svg", + "tagName": "span", "properties": { - "viewBox": "0 0 32 32" + "class": "line" }, "children": [ { "type": "element", - "tagName": "path", + "tagName": "span", "properties": { - "fill": "currentColor", - "d": "M12.1 2a9.8 9.8 0 0 0-5.4 1.6l6.4 6.4a2.1 2.1 0 0 1 .2 3a2.1 2.1 0 0 1-3-.2L3.7 6.4A9.84 9.84 0 0 0 2 12.1a10.14 10.14 0 0 0 10.1 10.1a10.9 10.9 0 0 0 2.6-.3l6.7 6.7a5 5 0 0 0 7.1-7.1l-6.7-6.7a10.9 10.9 0 0 0 .3-2.6A10 10 0 0 0 12.1 2m8 10.1a7.61 7.61 0 0 1-.3 2.1l-.3 1.1l.8.8l6.7 6.7a2.88 2.88 0 0 1 .9 2.1A2.72 2.72 0 0 1 27 27a2.9 2.9 0 0 1-4.2 0l-6.7-6.7l-.8-.8l-1.1.3a7.61 7.61 0 0 1-2.1.3a8.27 8.27 0 0 1-5.7-2.3A7.63 7.63 0 0 1 4 12.1a8.33 8.33 0 0 1 .3-2.2l4.4 4.4a4.14 4.14 0 0 0 5.9.2a4.14 4.14 0 0 0-.2-5.9L10 4.2a6.45 6.45 0 0 1 2-.3a8.27 8.27 0 0 1 5.7 2.3a8.49 8.49 0 0 1 2.4 5.9" + "style": "color:#CB7676" }, - "children": [] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-matched" - }, - "children": [ + "children": [ + { + "type": "text", + "value": "const " + } + ] + }, { - "type": "text", - "value": "t" + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": {" + } + ] } ] }, + { + "type": "text", + "value": "\n" + }, { "type": "element", "tagName": "span", "properties": { - "class": "twoslash-completions-unmatched" + "class": "line" }, "children": [ { - "type": "text", - "value": "est" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "element", - "value": "a", - "tagName": "span", - "properties": { - "class": "twoslash-hover" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-container" - }, - "children": [ - { - "type": "element", - "tagName": "code", - "properties": { - "class": "twoslash-popup-code" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " test" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "a" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "." - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "element", - "value": "test", - "tagName": "span", - "properties": { - "class": "twoslash-hover" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-container" - }, - "children": [ - { - "type": "element", - "tagName": "code", - "properties": { - "class": "twoslash-popup-code" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "test" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "test" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " ===" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "element", - "value": " '", - "tagName": "span", - "properties": {}, - "children": [ - { - "type": "text", - "value": " '" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completion-cursor" - }, - "children": [ - { - "type": "element", - "tagName": "ul", - "properties": { - "class": "twoslash-completion-list" - }, - "children": [ - { - "type": "element", - "tagName": "li", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-icon completions-string" - }, - "children": [ - { - "type": "element", - "tagName": "svg", - "properties": { - "viewBox": "0 0 32 32" - }, - "children": [ - { - "type": "element", - "tagName": "path", - "properties": { - "fill": "currentColor", - "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" - }, - "children": [] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-matched" - }, - "children": [ - { - "type": "text", - "value": "" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-unmatched" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "li", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-icon completions-string" - }, - "children": [ - { - "type": "element", - "tagName": "svg", - "properties": { - "viewBox": "0 0 32 32" - }, - "children": [ - { - "type": "element", - "tagName": "path", - "properties": { - "fill": "currentColor", - "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" - }, - "children": [] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-matched" - }, - "children": [ - { - "type": "text", - "value": "" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-unmatched" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "li", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-icon completions-string" - }, - "children": [ - { - "type": "element", - "tagName": "svg", - "properties": { - "viewBox": "0 0 32 32" - }, - "children": [ - { - "type": "element", - "tagName": "path", - "properties": { - "fill": "currentColor", - "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" - }, - "children": [] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": {}, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-matched" - }, - "children": [ - { - "type": "text", - "value": "" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-unmatched" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "element", - "value": "a", - "tagName": "span", - "properties": { - "class": "twoslash-hover" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-container" - }, - "children": [ - { - "type": "element", - "tagName": "code", - "properties": { - "class": "twoslash-popup-code" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " test" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "a" - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "." - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "element", - "value": "test", - "tagName": "span", - "properties": { - "class": "twoslash-hover" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-container" - }, - "children": [ - { - "type": "element", - "tagName": "code", - "properties": { - "class": "twoslash-popup-code" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "test" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] } ] } @@ -3073,7 +1689,7 @@ }, { "type": "text", - "value": "test" + "value": "a" } ] } @@ -3083,25 +1699,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": " === " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" + "style": "color:#666666" }, "children": [ { "type": "text", - "value": "'" + "value": "." } ] }, @@ -3114,13 +1717,13 @@ "children": [ { "type": "element", - "value": "b", + "value": "t", "tagName": "span", "properties": {}, "children": [ { "type": "text", - "value": "b" + "value": "t" }, { "type": "element", @@ -3145,7 +1748,7 @@ "type": "element", "tagName": "span", "properties": { - "class": "twoslash-completions-icon completions-string" + "class": "twoslash-completions-icon completions-property" }, "children": [ { @@ -3160,7 +1763,7 @@ "tagName": "path", "properties": { "fill": "currentColor", - "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + "d": "M12.1 2a9.8 9.8 0 0 0-5.4 1.6l6.4 6.4a2.1 2.1 0 0 1 .2 3a2.1 2.1 0 0 1-3-.2L3.7 6.4A9.84 9.84 0 0 0 2 12.1a10.14 10.14 0 0 0 10.1 10.1a10.9 10.9 0 0 0 2.6-.3l6.7 6.7a5 5 0 0 0 7.1-7.1l-6.7-6.7a10.9 10.9 0 0 0 .3-2.6A10 10 0 0 0 12.1 2m8 10.1a7.61 7.61 0 0 1-.3 2.1l-.3 1.1l.8.8l6.7 6.7a2.88 2.88 0 0 1 .9 2.1A2.72 2.72 0 0 1 27 27a2.9 2.9 0 0 1-4.2 0l-6.7-6.7l-.8-.8l-1.1.3a7.61 7.61 0 0 1-2.1.3a8.27 8.27 0 0 1-5.7-2.3A7.63 7.63 0 0 1 4 12.1a8.33 8.33 0 0 1 .3-2.2l4.4 4.4a4.14 4.14 0 0 0 5.9.2a4.14 4.14 0 0 0-.2-5.9L10 4.2a6.45 6.45 0 0 1 2-.3a8.27 8.27 0 0 1 5.7 2.3a8.49 8.49 0 0 1 2.4 5.9" }, "children": [] } @@ -3182,7 +1785,7 @@ "children": [ { "type": "text", - "value": "b" + "value": "t" } ] }, @@ -3195,74 +1798,368 @@ "children": [ { "type": "text", - "value": "ar" + "value": "est" } ] } ] } ] - }, + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "element", + "value": "a", + "tagName": "span", + "properties": { + "class": "twoslash-hover" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-container" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": { + "class": "twoslash-popup-code" + }, + "children": [ { "type": "element", - "tagName": "li", - "properties": {}, + "tagName": "pre", + "properties": { + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" + }, "children": [ { "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-completions-icon completions-string" - }, + "tagName": "code", + "properties": {}, "children": [ { "type": "element", - "tagName": "svg", + "tagName": "span", "properties": { - "viewBox": "0 0 32 32" + "class": "line" }, "children": [ { "type": "element", - "tagName": "path", + "tagName": "span", "properties": { - "fill": "currentColor", - "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + "style": "color:#CB7676" }, - "children": [] + "children": [ + { + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": {" + } + ] } ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": {}, - "children": [ + }, + { + "type": "text", + "value": "\n" + }, { "type": "element", "tagName": "span", "properties": { - "class": "twoslash-completions-matched" + "class": "line" }, "children": [ { - "type": "text", - "value": "b" + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] } ] }, + { + "type": "text", + "value": "\n" + }, { "type": "element", "tagName": "span", "properties": { - "class": "twoslash-completions-unmatched" + "class": "line" }, "children": [ { - "type": "text", - "value": "az" + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] } ] } @@ -3273,48 +2170,28 @@ ] } ] + }, + { + "type": "text", + "value": "a" } ] } ] - } - ] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [] - }, - { - "type": "text", - "value": "\n" - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "line" - }, - "children": [ + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "." + } + ] + }, { "type": "element", "tagName": "span", @@ -3324,7 +2201,7 @@ "children": [ { "type": "element", - "value": "a", + "value": "test", "tagName": "span", "properties": { "class": "twoslash-hover" @@ -3348,25 +2225,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" + "style": "color:#80A665" }, "children": [ { "type": "text", - "value": "a" + "value": "test" } ] }, @@ -3379,26 +2243,20 @@ "children": [ { "type": "text", - "value": ": {" + "value": ":" } ] }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, { "type": "element", "tagName": "span", "properties": { - "style": "color:#BD976A" + "style": "color:#C98A7D99" }, "children": [ { "type": "text", - "value": " test" + "value": " \"" } ] }, @@ -3406,12 +2264,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": ": " + "value": "foo" } ] }, @@ -3424,7 +2282,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -3432,12 +2290,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": "foo" + "value": " |" } ] }, @@ -3450,7 +2308,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -3458,12 +2316,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": " | " + "value": "bar" } ] }, @@ -3476,7 +2334,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -3484,12 +2342,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": "bar" + "value": " |" } ] }, @@ -3502,7 +2360,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -3510,12 +2368,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": " | " + "value": "baz" } ] }, @@ -3528,65 +2386,625 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] - }, + } + ] + } + ] + }, + { + "type": "text", + "value": "test" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": " ===" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "element", + "value": " '", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "text", + "value": " '" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completion-cursor" + }, + "children": [ + { + "type": "element", + "tagName": "ul", + "properties": { + "class": "twoslash-completion-list" + }, + "children": [ { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, + "tagName": "li", + "properties": {}, "children": [ { - "type": "text", - "value": "baz" + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-icon completions-string" + }, + "children": [ + { + "type": "element", + "tagName": "svg", + "properties": { + "viewBox": "0 0 32 32" + }, + "children": [ + { + "type": "element", + "tagName": "path", + "properties": { + "fill": "currentColor", + "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + }, + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-matched" + }, + "children": [ + { + "type": "text", + "value": "" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-unmatched" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + } + ] } ] }, { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, + "tagName": "li", + "properties": {}, "children": [ { - "type": "text", - "value": "'" + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-icon completions-string" + }, + "children": [ + { + "type": "element", + "tagName": "svg", + "properties": { + "viewBox": "0 0 32 32" + }, + "children": [ + { + "type": "element", + "tagName": "path", + "properties": { + "fill": "currentColor", + "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + }, + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-matched" + }, + "children": [ + { + "type": "text", + "value": "" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-unmatched" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + } + ] } ] }, { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, + "tagName": "li", + "properties": {}, "children": [ { - "type": "text", - "value": ";" + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-icon completions-string" + }, + "children": [ + { + "type": "element", + "tagName": "svg", + "properties": { + "viewBox": "0 0 32 32" + }, + "children": [ + { + "type": "element", + "tagName": "path", + "properties": { + "fill": "currentColor", + "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + }, + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-matched" + }, + "children": [ + { + "type": "text", + "value": "" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-unmatched" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + } + ] } ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "element", + "value": "a", + "tagName": "span", + "properties": { + "class": "twoslash-hover" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-container" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": { + "class": "twoslash-popup-code" + }, + "children": [ { "type": "element", - "tagName": "span", + "tagName": "pre", "properties": { - "style": "color:#666666" + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" }, "children": [ { - "type": "text", - "value": "}" + "type": "element", + "tagName": "code", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] } ] } @@ -3606,7 +3024,7 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#C98A7D" }, "children": [ { @@ -3619,7 +3037,7 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#BD976A" + "style": "color:#C98A7D" }, "children": [ { @@ -3829,12 +3247,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#CB7676" + "style": "color:#C98A7D" }, "children": [ { "type": "text", - "value": " ===" + "value": " === " } ] }, @@ -3847,7 +3265,7 @@ "children": [ { "type": "text", - "value": " '" + "value": "'" } ] }, @@ -3855,7 +3273,7 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#C98A7D" + "style": "color:#BD976A" }, "children": [ { @@ -4023,32 +3441,6 @@ ] } ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "ar" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] } ] }, @@ -4096,7 +3488,348 @@ "children": [ { "type": "element", - "value": "a", + "value": "a", + "tagName": "span", + "properties": { + "class": "twoslash-hover" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-container" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": { + "class": "twoslash-popup-code" + }, + "children": [ + { + "type": "element", + "tagName": "pre", + "properties": { + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "text", + "value": "a" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "." + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "element", + "value": "test", "tagName": "span", "properties": { "class": "twoslash-hover" @@ -4120,57 +3853,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" + "style": "color:#80A665" }, "children": [ { "type": "text", - "value": " test" + "value": "test" } ] }, @@ -4183,7 +3871,7 @@ "children": [ { "type": "text", - "value": ": " + "value": ":" } ] }, @@ -4196,7 +3884,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -4222,7 +3910,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -4230,12 +3918,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": " | " + "value": " |" } ] }, @@ -4248,7 +3936,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -4274,7 +3962,7 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" } ] }, @@ -4282,12 +3970,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "style": "color:#CB7676" }, "children": [ { "type": "text", - "value": " | " + "value": " |" } ] }, @@ -4300,7 +3988,7 @@ "children": [ { "type": "text", - "value": "'" + "value": " \"" } ] }, @@ -4326,39 +4014,597 @@ "children": [ { "type": "text", - "value": "'" + "value": "\"" + } + ] + } + ] + } + ] + }, + { + "type": "text", + "value": "test" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": " ===" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": " '" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "element", + "value": "b", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "text", + "value": "b" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completion-cursor" + }, + "children": [ + { + "type": "element", + "tagName": "ul", + "properties": { + "class": "twoslash-completion-list" + }, + "children": [ + { + "type": "element", + "tagName": "li", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-icon completions-string" + }, + "children": [ + { + "type": "element", + "tagName": "svg", + "properties": { + "viewBox": "0 0 32 32" + }, + "children": [ + { + "type": "element", + "tagName": "path", + "properties": { + "fill": "currentColor", + "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + }, + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-matched" + }, + "children": [ + { + "type": "text", + "value": "b" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-unmatched" + }, + "children": [ + { + "type": "text", + "value": "ar" + } + ] + } + ] } ] }, { "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, + "tagName": "li", + "properties": {}, "children": [ { - "type": "text", - "value": ";" + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-icon completions-string" + }, + "children": [ + { + "type": "element", + "tagName": "svg", + "properties": { + "viewBox": "0 0 32 32" + }, + "children": [ + { + "type": "element", + "tagName": "path", + "properties": { + "fill": "currentColor", + "d": "M29 22h-5a2.003 2.003 0 0 1-2-2v-6a2.002 2.002 0 0 1 2-2h5v2h-5v6h5zM18 12h-4V8h-2v14h6a2.003 2.003 0 0 0 2-2v-6a2.002 2.002 0 0 0-2-2m-4 8v-6h4v6zm-6-8H3v2h5v2H4a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h6v-8a2.002 2.002 0 0 0-2-2m0 8H4v-2h4z" + }, + "children": [] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-matched" + }, + "children": [ + { + "type": "text", + "value": "b" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-completions-unmatched" + }, + "children": [ + { + "type": "text", + "value": "az" + } + ] + } + ] } ] - }, - { - "type": "element", - "tagName": "br", - "properties": {}, - "children": [] - }, + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "ar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "element", + "value": "a", + "tagName": "span", + "properties": { + "class": "twoslash-hover" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-container" + }, + "children": [ + { + "type": "element", + "tagName": "code", + "properties": { + "class": "twoslash-popup-code" + }, + "children": [ { "type": "element", - "tagName": "span", + "tagName": "pre", "properties": { - "style": "color:#666666" + "class": "shiki vitesse-dark", + "style": "background-color:#121212;color:#dbd7caee", + "tabindex": "0" }, "children": [ { - "type": "text", - "value": "}" + "type": "element", + "tagName": "code", + "properties": {}, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": {" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ + { + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" + } + ] + } + ] + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "line" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "}" + } + ] + } + ] + } + ] } ] } diff --git a/packages/twoslash/test/out/rich/no-icons.html b/packages/twoslash/test/out/rich/no-icons.html index bc89d130d..f5565d4d9 100644 --- a/packages/twoslash/test/out/rich/no-icons.html +++ b/packages/twoslash/test/out/rich/no-icons.html @@ -24,12 +24,20 @@ background-color: var(--shiki-light-bg, inherit); } -
const const obj: {
boo: number;
bar: () => number;
baz: string;
}
obj
= {
+
const 
const obj: {
+    boo: number;
+    bar: () => number;
+    baz: string;
+}
obj
= {
boo: numberboo: 1, bar: () => numberbar: () => 2, baz: stringbaz: 'string' } -const obj: {
boo: number;
bar: () => number;
baz: string;
}
obj
.b
  • bar
  • baz
  • boo
boo: numberoo
+
const obj: {
+    boo: number;
+    bar: () => number;
+    baz: string;
+}
obj
.b
  • bar
  • baz
  • boo
boo: numberoo