diff --git a/packages/core/src/code-to-hast.ts b/packages/core/src/code-to-hast.ts index 5ecc74461..9efc82c6c 100644 --- a/packages/core/src/code-to-hast.ts +++ b/packages/core/src/code-to-hast.ts @@ -77,11 +77,15 @@ export function tokensToHast( const transformers = getTransformers(options) const lines: (Element | Text)[] = [] - const tree: Root = { + const root: Root = { type: 'root', children: [], } + const { + structure = 'classic', + } = options + let preNode: Element = { type: 'element', tagName: 'pre', @@ -110,6 +114,7 @@ export function tokensToHast( const context: ShikiTransformerContext = { ...transformerContext, + structure, addClassToHast, get source() { return transformerContext.source @@ -121,7 +126,7 @@ export function tokensToHast( return options }, get root() { - return tree + return root }, get pre() { return preNode @@ -135,8 +140,12 @@ export function tokensToHast( } tokens.forEach((line, idx) => { - if (idx) - lines.push({ type: 'text', value: '\n' }) + if (idx) { + if (structure === 'inline') + root.children.push({ type: 'element', tagName: 'br', properties: {}, children: [] }) + else if (structure === 'classic') + lines.push({ type: 'text', value: '\n' }) + } let lineNode: Element = { type: 'element', @@ -162,28 +171,35 @@ export function tokensToHast( for (const transformer of transformers) tokenNode = transformer?.span?.call(context, tokenNode, idx + 1, col, lineNode) || tokenNode - lineNode.children.push(tokenNode) + if (structure === 'inline') + root.children.push(tokenNode) + else if (structure === 'classic') + lineNode.children.push(tokenNode) col += token.content.length } - for (const transformer of transformers) - lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode + if (structure === 'classic') { + for (const transformer of transformers) + lineNode = transformer?.line?.call(context, lineNode, idx + 1) || lineNode - lineNodes.push(lineNode) - lines.push(lineNode) + lineNodes.push(lineNode) + lines.push(lineNode) + } }) - for (const transformer of transformers) - codeNode = transformer?.code?.call(context, codeNode) || codeNode + if (structure === 'classic') { + for (const transformer of transformers) + codeNode = transformer?.code?.call(context, codeNode) || codeNode - preNode.children.push(codeNode) + preNode.children.push(codeNode) - for (const transformer of transformers) - preNode = transformer?.pre?.call(context, preNode) || preNode + for (const transformer of transformers) + preNode = transformer?.pre?.call(context, preNode) || preNode - tree.children.push(preNode) + root.children.push(preNode) + } - let result = tree + let result = root for (const transformer of transformers) result = transformer?.root?.call(context, result) || result diff --git a/packages/core/src/types/options.ts b/packages/core/src/types/options.ts index 25ee33958..b6c355f1f 100644 --- a/packages/core/src/types/options.ts +++ b/packages/core/src/types/options.ts @@ -132,6 +132,16 @@ export interface CodeToHastOptionsCommon * @default true */ mergeWhitespaces?: boolean | 'never' + + /** + * The structure of the generated HAST and HTML. + * + * - `classic`: The classic structure with `
` and `` elements, each line wrapped with a `` element.
+   * - `inline`: All tokens are rendered as ``, line breaks are rendered as `
`. No `
` or `` elements. Default forground and background colors are not applied.
+   *
+   * @default 'classic'
+   */
+  structure?: 'classic' | 'inline'
 }
 
 export interface CodeOptionsMeta {
diff --git a/packages/core/src/types/transformers.ts b/packages/core/src/types/transformers.ts
index 7768beefe..100ce4225 100644
--- a/packages/core/src/types/transformers.ts
+++ b/packages/core/src/types/transformers.ts
@@ -35,6 +35,8 @@ export interface ShikiTransformerContext extends ShikiTransformerContextSource {
   readonly code: Element
   readonly lines: Element[]
 
+  readonly structure: CodeToHastOptions['structure']
+
   /**
    * Utility to append class to a hast node
    *
diff --git a/packages/shiki/test/hast.test.ts b/packages/shiki/test/hast.test.ts
index 200fb5e11..09b4d52c8 100644
--- a/packages/shiki/test/hast.test.ts
+++ b/packages/shiki/test/hast.test.ts
@@ -22,6 +22,22 @@ describe('should', () => {
         foo.bar
" `) }) + + it('structure inline', async () => { + const shiki = await getHighlighter({ + themes: ['vitesse-light'], + langs: ['javascript'], + }) + + const hast = shiki.codeToHast('console.log\nfoo.bar', { + lang: 'js', + theme: 'vitesse-light', + structure: 'inline', + }) + + expect(toHtml(hast)) + .toMatchInlineSnapshot(`"console.log
foo.bar"`) + }) }) it('hasfocus support', async () => { diff --git a/packages/twoslash/src/renderer-rich.ts b/packages/twoslash/src/renderer-rich.ts index e05cbdb69..3079e34ea 100644 --- a/packages/twoslash/src/renderer-rich.ts +++ b/packages/twoslash/src/renderer-rich.ts @@ -223,16 +223,22 @@ export function rendererRich(options: RendererRichOptions = {}): TwoslashRendere const popupContents: ElementContent[] = [] - const typeCode = ((this.codeToHast( - content, - { - ...this.options, - transformers: [], - lang: (this.options.lang === 'tsx' || this.options.lang === 'jsx') - ? 'tsx' - : 'ts', - }, - ).children[0] as Element).children as Element[])[0] + const typeCode: Element = { + type: 'element', + tagName: 'code', + properties: {}, + children: this.codeToHast( + content, + { + ...this.options, + transformers: [], + lang: (this.options.lang === 'tsx' || this.options.lang === 'jsx') + ? 'tsx' + : 'ts', + structure: 'inline', + }, + ).children as ElementContent[], + } typeCode.properties.class = 'twoslash-popup-code' popupContents.push( diff --git a/packages/twoslash/test/out/completion-end-multifile-2.ts.html b/packages/twoslash/test/out/completion-end-multifile-2.ts.html index c75967489..9066c4718 100644 --- a/packages/twoslash/test/out/completion-end-multifile-2.ts.html +++ b/packages/twoslash/test/out/completion-end-multifile-2.ts.html @@ -1,4 +1,4 @@ -
import { const foo: "foo"foo } from './foo'
+
import { const foo: "foo"foo } from './foo'
 
-var console: Consoleconsole.e
  • error
+var console: Consoleconsole.e
  • error
\ No newline at end of file diff --git a/packages/twoslash/test/out/completion-end-multifile-2.ts.json b/packages/twoslash/test/out/completion-end-multifile-2.ts.json index 6aafedf4c..15abc2f6c 100644 --- a/packages/twoslash/test/out/completion-end-multifile-2.ts.json +++ b/packages/twoslash/test/out/completion-end-multifile-2.ts.json @@ -99,86 +99,77 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -317,60 +308,51 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "var " - } - ] - }, + "type": "text", + "value": "var " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "console" - } - ] - }, + "type": "text", + "value": "console" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Console" - } - ] + "type": "text", + "value": "Console" } ] } diff --git a/packages/twoslash/test/out/completion-end-multifile.ts.html b/packages/twoslash/test/out/completion-end-multifile.ts.html index 87eb8051f..500d52703 100644 --- a/packages/twoslash/test/out/completion-end-multifile.ts.html +++ b/packages/twoslash/test/out/completion-end-multifile.ts.html @@ -1,13 +1,9 @@ -
import { const foo: "foo"foo } from './foo'
+
import { const foo: "foo"foo } from './foo'
  
-type type Example = {
-    name: 'foo' | 'bar' | 'baz';
-}Example = {
-  name: "foo" | "bar" | "baz"name: 'foo' | 'bar' | 'baz'
+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 example: Exampleexample.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 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 26069aea8..c67f52318 100644 --- a/packages/twoslash/test/out/completion-end-multifile.ts.json +++ b/packages/twoslash/test/out/completion-end-multifile.ts.json @@ -99,86 +99,77 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -357,281 +348,258 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "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": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " =" - } - ] - }, + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " {" - } - ] + "type": "text", + "value": " {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " name" - } - ] - }, + "type": "text", + "value": " name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -732,177 +700,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "name" - } - ] - }, + "type": "text", + "value": "name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -1185,60 +1144,51 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "example" - } - ] - }, + "type": "text", + "value": "example" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Example" - } - ] + "type": "text", + "value": "Example" } ] } @@ -1300,281 +1250,258 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "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": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " =" - } - ] - }, + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " {" - } - ] + "type": "text", + "value": " {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " name" - } - ] - }, + "type": "text", + "value": " name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -1649,177 +1576,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "name" - } - ] - }, + "type": "text", + "value": "name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -1946,60 +1864,51 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "example" - } - ] - }, + "type": "text", + "value": "example" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Example" - } - ] + "type": "text", + "value": "Example" } ] } @@ -2061,177 +1970,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "name" - } - ] - }, + "type": "text", + "value": "name" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } diff --git a/packages/twoslash/test/out/completion-end.ts.html b/packages/twoslash/test/out/completion-end.ts.html index 2524fe743..16c542991 100644 --- a/packages/twoslash/test/out/completion-end.ts.html +++ b/packages/twoslash/test/out/completion-end.ts.html @@ -1,32 +1,20 @@ -
var console: Consoleconsole.e
  • error
+
var console: Consoleconsole.e
  • error
-const const a: { - test: 'foo' | 'bar' | 'baz'; -}a: { test: "foo" | "bar" | "baz"test: 'foo' | 'bar' | 'baz' } = { - test: "foo" | "bar" | "baz"test: 'foo' +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 1e3b85a47..c7de6078c 100644 --- a/packages/twoslash/test/out/completion-end.ts.json +++ b/packages/twoslash/test/out/completion-end.ts.json @@ -60,60 +60,51 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "var " - } - ] - }, + "type": "text", + "value": "var " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "console" - } - ] - }, + "type": "text", + "value": "console" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Console" - } - ] + "type": "text", + "value": "Console" } ] } @@ -349,280 +340,257 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "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": "const " } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "a" + } + ] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "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": ": {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": " test" } ] - } - ] - } - ] - }, - { - "type": "text", - "value": "a" - } - ] + }, + { + "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" + } + ] } ] }, @@ -672,177 +640,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "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": "text", + "value": "test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "\"" } ] } @@ -1099,177 +1058,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "test" - } - ] - }, + "type": "text", + "value": "test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -1409,268 +1359,245 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] + "type": "text", + "value": ": {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "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": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -1875,268 +1802,245 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] + "type": "text", + "value": ": {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " test" - } - ] - }, + "type": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -2198,177 +2102,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "test" - } - ] - }, + "type": "text", + "value": "test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -2707,268 +2602,245 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] + "type": "text", + "value": ": {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "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": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -3030,177 +2902,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "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": "text", + "value": "test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "\"" } ] } @@ -3485,268 +3348,245 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] + "type": "text", + "value": ": {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "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": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -3808,177 +3648,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "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": "text", + "value": "test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "\"" } ] } @@ -4289,268 +4120,245 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": {" - } - ] + "type": "text", + "value": ": {" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "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": "text", + "value": " test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " | " - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": " | " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "'" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ";" - } - ] + "type": "text", + "value": "'" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ";" } ] }, { - "type": "text", - "value": "\n" + "type": "element", + "tagName": "br", + "properties": {}, + "children": [] }, { "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#666666" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "}" - } - ] + "type": "text", + "value": "}" } ] } @@ -4612,177 +4420,168 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "test" - } - ] - }, + "type": "text", + "value": "test" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ":" - } - ] - }, + "type": "text", + "value": ":" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } diff --git a/packages/twoslash/test/out/completion-string.ts.html b/packages/twoslash/test/out/completion-string.ts.html index 88ef08987..6c890a308 100644 --- a/packages/twoslash/test/out/completion-string.ts.html +++ b/packages/twoslash/test/out/completion-string.ts.html @@ -1,3 +1,3 @@ -
type type A = "@foo" | "@bar" | "/foo" | "/bar"A = '@foo' | '@bar' | '/foo' | '/bar'
+
type type A = "@foo" | "@bar" | "/foo" | "/bar"A = '@foo' | '@bar' | '/foo' | '/bar'
 
-const a: type A = "@foo" | "@bar" | "/foo" | "/bar"A = '@
  • @foo
  • @bar
'
Type '"@"' is not assignable to type 'A'.
\ No newline at end of file +const a: type A = "@foo" | "@bar" | "/foo" | "/bar"A = '@
  • @foo
  • @bar
'
Type '"@"' is not assignable to type 'A'.
\ No newline at end of file diff --git a/packages/twoslash/test/out/completion-string.ts.json b/packages/twoslash/test/out/completion-string.ts.json index 338160f7d..8e8bf24e9 100644 --- a/packages/twoslash/test/out/completion-string.ts.json +++ b/packages/twoslash/test/out/completion-string.ts.json @@ -86,138 +86,129 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#F97583" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#B392F0" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#B392F0" - }, - "children": [ - { - "type": "text", - "value": " A" - } - ] - }, + "type": "text", + "value": " A" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " =" - } - ] - }, + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"@foo\"" - } - ] - }, + "type": "text", + "value": " \"@foo\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"@bar\"" - } - ] - }, + "type": "text", + "value": " \"@bar\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"/foo\"" - } - ] - }, + "type": "text", + "value": " \"/foo\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"/bar\"" - } - ] + "type": "text", + "value": " \"/bar\"" } ] } @@ -469,138 +460,129 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#F97583" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#B392F0" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#B392F0" - }, - "children": [ - { - "type": "text", - "value": " A" - } - ] - }, + "type": "text", + "value": " A" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " =" - } - ] - }, + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"@foo\"" - } - ] - }, + "type": "text", + "value": " \"@foo\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"@bar\"" - } - ] - }, + "type": "text", + "value": " \"@bar\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"/foo\"" - } - ] - }, + "type": "text", + "value": " \"/foo\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#F97583" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#F97583" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#9ECBFF" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#9ECBFF" - }, - "children": [ - { - "type": "text", - "value": " \"/bar\"" - } - ] + "type": "text", + "value": " \"/bar\"" } ] } diff --git a/packages/twoslash/test/out/error-multi-tokens.html b/packages/twoslash/test/out/error-multi-tokens.html index 34683ad90..fb758d704 100644 --- a/packages/twoslash/test/out/error-multi-tokens.html +++ b/packages/twoslash/test/out/error-multi-tokens.html @@ -1,2 +1,2 @@ -
const const x: [number]x: [number] = ["hello"]
Type 'string' is not assignable to type 'number'.
\ No newline at end of file +
const const x: [number]x: [number] = ["hello"]
Type 'string' is not assignable to type 'number'.
\ No newline at end of file diff --git a/packages/twoslash/test/out/highlights.ts.html b/packages/twoslash/test/out/highlights.ts.html index d44f8493b..a6b9a30e6 100644 --- a/packages/twoslash/test/out/highlights.ts.html +++ b/packages/twoslash/test/out/highlights.ts.html @@ -1,8 +1,8 @@ -
type type Result = "pass" | "fail"Result = "pass" | "fail"
+
type type Result = "pass" | "fail"Result = "pass" | "fail"
 
-const const hello: "OK"heconst hello: "OK"llo = "OK"
+const const hello: "OK"heconst hello: "OK"llo = "OK"
 
-const const world: "OK"worlconst world: "OK"d = "OK"
+const const world: "OK"worlconst world: "OK"d = "OK"
 
-var console: Consoleconsole.Console.log(...data: any[]): void
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
log
("OK")
+var console: Consoleconsole.Console.log(...data: any[]): void
[MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
log
("OK")
\ No newline at end of file diff --git a/packages/twoslash/test/out/highlights.ts.json b/packages/twoslash/test/out/highlights.ts.json index e0cd128d3..9570d0608 100644 --- a/packages/twoslash/test/out/highlights.ts.json +++ b/packages/twoslash/test/out/highlights.ts.json @@ -93,138 +93,129 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "type" - } - ] - }, + "type": "text", + "value": "type" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": " Result" - } - ] - }, + "type": "text", + "value": " Result" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " =" - } - ] - }, + "type": "text", + "value": " =" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "pass" - } - ] - }, + "type": "text", + "value": "pass" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " |" - } - ] - }, + "type": "text", + "value": " |" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": " \"" - } - ] - }, + "type": "text", + "value": " \"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "fail" - } - ] - }, + "type": "text", + "value": "fail" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -419,143 +410,6 @@ "properties": { "class": "twoslash-popup-code" }, - "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": "hello" - } - ] - }, - { - "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": "OK" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "text", - "value": "he" - } - ] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "element", - "value": "llo", - "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": { - "class": "line" - }, "children": [ { "type": "element", @@ -638,12 +492,12 @@ ] } ] + }, + { + "type": "text", + "value": "he" } ] - }, - { - "type": "text", - "value": "llo" } ] } @@ -653,237 +507,116 @@ "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": "OK" - } - ] - }, - { - "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": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "cons" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-highlighted" + "style": "color:#BD976A" }, "children": [ { "type": "element", + "value": "llo", "tagName": "span", "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "t " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" + "class": "twoslash-hover" }, "children": [ { "type": "element", - "value": "worl", "tagName": "span", "properties": { - "class": "twoslash-hover" + "class": "twoslash-popup-container" }, "children": [ { "type": "element", - "tagName": "span", + "tagName": "code", "properties": { - "class": "twoslash-popup-container" + "class": "twoslash-popup-code" }, "children": [ { "type": "element", - "tagName": "code", + "tagName": "span", "properties": { - "class": "twoslash-popup-code" + "style": "color:#CB7676" }, "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": "world" - } - ] - }, - { - "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": "OK" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - } - ] + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "hello" + } + ] + }, + { + "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": "OK" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "\"" } ] } ] - }, - { - "type": "text", - "value": "worl" } ] + }, + { + "type": "text", + "value": "llo" } ] } @@ -893,36 +626,139 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#BD976A" + "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": "OK" + } + ] + }, + { + "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": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "cons" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-highlighted" }, "children": [ { "type": "element", - "value": "d", "tagName": "span", "properties": { - "class": "twoslash-hover" + "style": "color:#CB7676" + }, + "children": [ + { + "type": "text", + "value": "t " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" }, "children": [ { "type": "element", + "value": "worl", "tagName": "span", "properties": { - "class": "twoslash-popup-container" + "class": "twoslash-hover" }, "children": [ { "type": "element", - "tagName": "code", + "tagName": "span", "properties": { - "class": "twoslash-popup-code" + "class": "twoslash-popup-container" }, "children": [ { "type": "element", - "tagName": "span", + "tagName": "code", "properties": { - "class": "line" + "class": "twoslash-popup-code" }, "children": [ { @@ -1006,6 +842,125 @@ ] } ] + }, + { + "type": "text", + "value": "worl" + } + ] + } + ] + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "element", + "value": "d", + "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": "world" + } + ] + }, + { + "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": "OK" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ + { + "type": "text", + "value": "\"" + } + ] + } + ] } ] }, @@ -1127,60 +1082,51 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "var " - } - ] - }, + "type": "text", + "value": "var " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "console" - } - ] - }, + "type": "text", + "value": "console" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Console" - } - ] + "type": "text", + "value": "Console" } ] } @@ -1242,138 +1188,129 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#BD976A" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "Console" - } - ] - }, + "type": "text", + "value": "Console" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "." - } - ] - }, + "type": "text", + "value": "." + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#80A665" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "log" - } - ] - }, + "type": "text", + "value": "log" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "(..." - } - ] - }, + "type": "text", + "value": "(..." + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "data" - } - ] - }, + "type": "text", + "value": "data" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#DBD7CAEE" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#DBD7CAEE" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "any" - } - ] - }, + "type": "text", + "value": "any" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "[])" - } - ] - }, + "type": "text", + "value": "[])" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#DBD7CAEE" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#DBD7CAEE" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "void" - } - ] + "type": "text", + "value": "void" } ] } diff --git a/packages/twoslash/test/out/import-vue.ts.html b/packages/twoslash/test/out/import-vue.ts.html index eaa10eb00..0f8e9e48c 100644 --- a/packages/twoslash/test/out/import-vue.ts.html +++ b/packages/twoslash/test/out/import-vue.ts.html @@ -1,6 +1,6 @@ -
import { function ref<T>(value: T): Ref<UnwrapRef<T>> (+1 overload)
Takes an inner value and returns a reactive and mutable ref object, which +
import { function ref<T>(value: T): Ref<UnwrapRef<T>> (+1 overload)
Takes an inner value and returns a reactive and mutable ref object, which has a single property `.value` that points to the inner value.
@paramvalue - The object to wrap in the ref.@see{@link https://vuejs.org/api/reactivity-core.html#ref}
ref
} from "vue"
-const const a: Ref<number>a = ref<number>(value: number): Ref<number> (+1 overload)
Takes an inner value and returns a reactive and mutable ref object, which +const const a: Ref<number>a = ref<number>(value: number): Ref<number> (+1 overload)
Takes an inner value and returns a reactive and mutable ref object, which has a single property `.value` that points to the inner value.
@paramvalue - The object to wrap in the ref.@see{@link https://vuejs.org/api/reactivity-core.html#ref}
ref
(10)
a.value = 'hi'
Type 'string' is not assignable to type 'number'.
\ No newline at end of file diff --git a/packages/twoslash/test/out/import-vue.ts.json b/packages/twoslash/test/out/import-vue.ts.json index 8d15e2a42..a8513f687 100644 --- a/packages/twoslash/test/out/import-vue.ts.json +++ b/packages/twoslash/test/out/import-vue.ts.json @@ -99,32 +99,301 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "function" - } - ] - }, + "type": "text", + "value": "function" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#80A665" + }, + "children": [ + { + "type": "text", + "value": " ref" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "<" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": "T" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ">(" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ + { + "type": "text", + "value": "value" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": "T" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "):" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": " Ref" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "<" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": "UnwrapRef" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": "<" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": "T" + } + ] + }, + { + "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": "span", + "properties": { + "style": "color:#DBD7CAEE" + }, + "children": [ + { + "type": "text", + "value": "+" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#4C9A91" + }, + "children": [ + { + "type": "text", + "value": "1" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ + { + "type": "text", + "value": " overload" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ + { + "type": "text", + "value": ")" + } + ] + } + ] + }, + { + "type": "element", + "tagName": "div", + "properties": { + "class": "twoslash-popup-docs" + }, + "children": [ + { + "type": "text", + "value": "Takes an inner value and returns a reactive and mutable ref object, which\nhas a single property `.value` that points to the inner value." + } + ] + }, + { + "type": "element", + "tagName": "div", + "properties": { + "class": "twoslash-popup-docs twoslash-popup-docs-tags" + }, + "children": [ + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-docs-tag" + }, + "children": [ { "type": "element", "tagName": "span", "properties": { - "style": "color:#80A665" + "class": "twoslash-popup-docs-tag-name" }, "children": [ { "type": "text", - "value": " ref" + "value": "@param" } ] }, @@ -132,25 +401,34 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "class": "twoslash-popup-docs-tag-value" }, "children": [ { "type": "text", - "value": "<" + "value": "value - The object to wrap in the ref." } ] - }, + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "class": "twoslash-popup-docs-tag" + }, + "children": [ { "type": "element", "tagName": "span", "properties": { - "style": "color:#5DA994" + "class": "twoslash-popup-docs-tag-name" }, "children": [ { "type": "text", - "value": "T" + "value": "@see" } ] }, @@ -158,299 +436,12 @@ "type": "element", "tagName": "span", "properties": { - "style": "color:#666666" + "class": "twoslash-popup-docs-tag-value" }, "children": [ { "type": "text", - "value": ">(" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "value" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "T" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "):" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": " Ref" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "<" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "UnwrapRef" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "<" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "T" - } - ] - }, - { - "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": "span", - "properties": { - "style": "color:#DBD7CAEE" - }, - "children": [ - { - "type": "text", - "value": "+" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#4C9A91" - }, - "children": [ - { - "type": "text", - "value": "1" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": " overload" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ")" - } - ] - } - ] - } - ] - }, - { - "type": "element", - "tagName": "div", - "properties": { - "class": "twoslash-popup-docs" - }, - "children": [ - { - "type": "text", - "value": "Takes an inner value and returns a reactive and mutable ref object, which\nhas a single property `.value` that points to the inner value." - } - ] - }, - { - "type": "element", - "tagName": "div", - "properties": { - "class": "twoslash-popup-docs twoslash-popup-docs-tags" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-docs-tag" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-docs-tag-name" - }, - "children": [ - { - "type": "text", - "value": "@param" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-docs-tag-value" - }, - "children": [ - { - "type": "text", - "value": "value - The object to wrap in the ref." - } - ] - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-docs-tag" - }, - "children": [ - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-docs-tag-name" - }, - "children": [ - { - "type": "text", - "value": "@see" - } - ] - }, - { - "type": "element", - "tagName": "span", - "properties": { - "class": "twoslash-popup-docs-tag-value" - }, - "children": [ - { - "type": "text", - "value": "{@link https://vuejs.org/api/reactivity-core.html#ref}" + "value": "{@link https://vuejs.org/api/reactivity-core.html#ref}" } ] } @@ -604,99 +595,90 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "a" - } - ] - }, + "type": "text", + "value": "a" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "Ref" - } - ] - }, + "type": "text", + "value": "Ref" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "<" - } - ] - }, + "type": "text", + "value": "<" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "number" - } - ] - }, + "type": "text", + "value": "number" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ">" - } - ] + "type": "text", + "value": ">" } ] } @@ -771,242 +753,233 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#80A665" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "ref" - } - ] - }, + "type": "text", + "value": "ref" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "<" - } - ] - }, + "type": "text", + "value": "<" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "number" - } - ] - }, + "type": "text", + "value": "number" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ">(" - } - ] - }, + "type": "text", + "value": ">(" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "value" - } - ] - }, + "type": "text", + "value": "value" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#DBD7CAEE" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#DBD7CAEE" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "number" - } - ] - }, + "type": "text", + "value": "number" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ")" - } - ] - }, + "type": "text", + "value": ")" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#DBD7CAEE" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#DBD7CAEE" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#80A665" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#80A665" - }, - "children": [ - { - "type": "text", - "value": "Ref" - } - ] - }, + "type": "text", + "value": "Ref" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": "<" - } - ] - }, + "type": "text", + "value": "<" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#5DA994" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#5DA994" - }, - "children": [ - { - "type": "text", - "value": "number" - } - ] - }, + "type": "text", + "value": "number" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ">" - } - ] - }, + "type": "text", + "value": ">" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": " (" - } - ] - }, + "type": "text", + "value": " (" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#CB7676" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "+" - } - ] - }, + "type": "text", + "value": "+" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#4C9A91" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#4C9A91" - }, - "children": [ - { - "type": "text", - "value": "1" - } - ] - }, + "type": "text", + "value": "1" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": " overload" - } - ] - }, + "type": "text", + "value": " overload" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ")" - } - ] + "type": "text", + "value": ")" } ] } diff --git a/packages/twoslash/test/out/markdown-it/highlight-lines.html b/packages/twoslash/test/out/markdown-it/highlight-lines.html index 060bba0dc..5e405f8eb 100644 --- a/packages/twoslash/test/out/markdown-it/highlight-lines.html +++ b/packages/twoslash/test/out/markdown-it/highlight-lines.html @@ -16,11 +16,11 @@ }

Hello

-
const const a: 123a = 123
-const const b: 123b = 123
-const 
const v: 123
v
= 123
+
const const a: 123a = 123
+const const b: 123b = 123
+const 
const v: 123
v
= 123
-
const const a: 123a = 123
-const const b: 123b = 123
-const 
const v: 123
v
= 123
+
const const a: 123a = 123
+const const b: 123b = 123
+const 
const v: 123
v
= 123
diff --git a/packages/twoslash/test/out/markdown-it/works.html b/packages/twoslash/test/out/markdown-it/works.html index 6ff80426b..b486c4d79 100644 --- a/packages/twoslash/test/out/markdown-it/works.html +++ b/packages/twoslash/test/out/markdown-it/works.html @@ -17,7 +17,7 @@

Hello

Code block with twoslash:

-
const 
const a: 123
a
= 123
+
const 
const a: 123
a
= 123

Code block without twoslash:

const a = 123
diff --git a/packages/twoslash/test/out/query-offset.ts.html b/packages/twoslash/test/out/query-offset.ts.html
index 368887f8f..6dc8382cb 100644
--- a/packages/twoslash/test/out/query-offset.ts.html
+++ b/packages/twoslash/test/out/query-offset.ts.html
@@ -1,10 +1,10 @@
-
const 
const foo: "123"
foo
= "123"
+
const 
const foo: "123"
foo
= "123"
-const
const bar: "123"
bar
= "123"
+const
const bar: "123"
bar
= "123"
-const
const baz: "123"
baz
= "123"
+const
const baz: "123"
baz
= "123"
\ No newline at end of file diff --git a/packages/twoslash/test/out/query-offset.ts.json b/packages/twoslash/test/out/query-offset.ts.json index bdd7b5a37..67fe31052 100644 --- a/packages/twoslash/test/out/query-offset.ts.json +++ b/packages/twoslash/test/out/query-offset.ts.json @@ -81,86 +81,77 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "foo" - } - ] - }, + "type": "text", + "value": "foo" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "123" - } - ] - }, + "type": "text", + "value": "123" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -331,86 +322,77 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "bar" - } - ] - }, + "type": "text", + "value": "bar" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "123" - } - ] - }, + "type": "text", + "value": "123" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } @@ -581,86 +563,77 @@ "type": "element", "tagName": "span", "properties": { - "class": "line" + "style": "color:#CB7676" }, "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#CB7676" - }, - "children": [ - { - "type": "text", - "value": "const " - } - ] - }, + "type": "text", + "value": "const " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#BD976A" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#BD976A" - }, - "children": [ - { - "type": "text", - "value": "baz" - } - ] - }, + "type": "text", + "value": "baz" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#666666" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#666666" - }, - "children": [ - { - "type": "text", - "value": ": " - } - ] - }, + "type": "text", + "value": ": " + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] - }, + "type": "text", + "value": "\"" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D" - }, - "children": [ - { - "type": "text", - "value": "123" - } - ] - }, + "type": "text", + "value": "123" + } + ] + }, + { + "type": "element", + "tagName": "span", + "properties": { + "style": "color:#C98A7D99" + }, + "children": [ { - "type": "element", - "tagName": "span", - "properties": { - "style": "color:#C98A7D99" - }, - "children": [ - { - "type": "text", - "value": "\"" - } - ] + "type": "text", + "value": "\"" } ] } diff --git a/packages/twoslash/test/out/rich/custom-tags.html b/packages/twoslash/test/out/rich/custom-tags.html index 39a3e5d0d..c17b485c8 100644 --- a/packages/twoslash/test/out/rich/custom-tags.html +++ b/packages/twoslash/test/out/rich/custom-tags.html @@ -24,12 +24,12 @@ background-color: var(--shiki-light-bg, inherit); } -
import { function getHighlighterCore(options?: HighlighterCoreOptions): Promise<HighlighterCore>
Create a Shiki core highlighter instance, with no languages or themes bundled. +
import { function getHighlighterCore(options?: HighlighterCoreOptions): Promise<HighlighterCore>
Create a Shiki core highlighter instance, with no languages or themes bundled. Wasm and each language and theme must be loaded manually.
@seehttp://shiki.style/guide/install#fine-grained-bundle
getHighlighterCore
} from 'shiki/core'
-const const shiki: HighlighterCoreshiki = await function getHighlighterCore(options?: HighlighterCoreOptions | undefined): Promise<HighlighterCore>
Create a Shiki core highlighter instance, with no languages or themes bundled. +const const shiki: HighlighterCoreshiki = await function getHighlighterCore(options?: HighlighterCoreOptions | undefined): Promise<HighlighterCore>
Create a Shiki core highlighter instance, with no languages or themes bundled. Wasm and each language and theme must be loaded manually.
@seehttp://shiki.style/guide/install#fine-grained-bundle
getHighlighterCore
({})
-const const a: 1a = 1
Custom log message
const const b: 1b = 1
Custom error message
const const c: 1c = 1
Custom warning message
Custom annotation message
+const const a: 1a = 1
Custom log message
const const b: 1b = 1
Custom error message
const const c: 1c = 1
Custom warning message
Custom annotation message