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: foo.ts
2export const x = 3;
3export const y = 5;
4
5// @filename: bar.ts
6import * as foo from "./foo";
7
…lines 8–12 unchanged (5 lines)

After

1// @module: commonjs
2// @target: es2015
3// @filename: foo.ts
4export const x = 3;
5export const y = 5;
6
7// @filename: bar.ts
8import * as foo from "./foo";
…lines 9–14 unchanged (6 lines)

Before

program
comment "// @filename: foo.ts"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "x"
= "="
number "3"
; ";"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "y"
= "="
number "5"
; ";"
comment "// @filename: bar.ts"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "foo"
from "from"
string
" "\""
string_fragment "./foo"
" "\""
; ";"
function_declaration (+28 nodes collapsed)
expression_statement
call_expression
identifier "f"
arguments
( "("
identifier "foo"
) ")"
; ";"

After

program
comment "// @module: commonjs"
comment "// @target: es2015"
comment "// @filename: foo.ts"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "x"
= "="
number "3"
; ";"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "y"
= "="
number "5"
; ";"
comment "// @filename: bar.ts"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "foo"
from "from"
string
" "\""
string_fragment "./foo"
" "\""
; ";"
function_declaration (+28 nodes collapsed)
expression_statement
call_expression
identifier "f"
arguments
( "("
identifier "foo"
) ")"
; ";"