Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1// @filename: file.tsx
2// @jsx: preserve
3// @noLib: true
4// @skipLibCheck: true
5// @libFiles: react.d.ts,lib.d.ts
6
7import React = require('react');
8
9type TextProps = { editable: false }
10 | { editable: true, onEdit: (newText: string) => void };
11
…lines 12–23 unchanged (12 lines)

After

1// @filename: file.tsx
2// @jsx: preserve
3// @skipLibCheck: true
4// @libFiles: react.d.ts
5
6import React = require('react');
7
8type TextProps = { editable: false }
9 | { editable: true, onEdit: (newText: string) => void };
10
…lines 11–22 unchanged (12 lines)

Before

program
comment "// @filename: file.tsx"
comment "// @jsx: preserve"
comment "// @noLib: true"
comment "// @skipLibCheck: true"
comment "// @libFiles: react.d.ts,lib.d.ts"
import_statement
import "import"
import_require_clause
identifier "React"
= "="
require "require"
( "("
string
' "'"
string_fragment "react"
' "'"
) ")"
; ";"
type_alias_declaration (+43 nodes collapsed)
class_declaration (+42 nodes collapsed)
comment "// Error"
lexical_declaration
let "let"
variable_declarator
identifier "x"
= "="
jsx_self_closing_element
< "<"
identifier "TextComponent"
jsx_attribute
property_identifier "editable"
= "="
jsx_expression
{ "{"
true "true"
} "}"
/> "/>"
lexical_declaration
const "const"
variable_declarator
identifier "textProps"
type_annotation
: ":"
type_identifier "TextProps"
= "="
object
{ "{"
pair
property_identifier "editable"
: ":"
false "false"
} "}"
; ";"

After

program
comment "// @filename: file.tsx"
comment "// @jsx: preserve"
comment "// @skipLibCheck: true"
comment "// @libFiles: react.d.ts"
import_statement
import "import"
import_require_clause
identifier "React"
= "="
require "require"
( "("
string
' "'"
string_fragment "react"
' "'"
) ")"
; ";"
type_alias_declaration (+43 nodes collapsed)
class_declaration (+42 nodes collapsed)
comment "// Error"
lexical_declaration
let "let"
variable_declarator
identifier "x"
= "="
jsx_self_closing_element
< "<"
identifier "TextComponent"
jsx_attribute
property_identifier "editable"
= "="
jsx_expression
{ "{"
true "true"
} "}"
/> "/>"
lexical_declaration
const "const"
variable_declarator
identifier "textProps"
type_annotation
: ":"
type_identifier "TextProps"
= "="
object
{ "{"
pair
property_identifier "editable"
: ":"
false "false"
} "}"
; ";"