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

1class User {
2 constructor(public name: string, public email: string) {}
3
4 getName(): string {
5 return this.name;
6 }
7
8 getEmail(): string {
9 return this.email;
10 }
11}
12
13class Admin {
14 constructor(public name: string, public email: string) {}
15
16 getName(): string {
17 return this.name;
18 }
19
20 getEmail(): string {
21 return this.email;
22 }
23}
24

After

1interface Person {
2 name: string;
3 email: string;
4 getName(): string;
5 getEmail(): string;
6}
7
8class User implements Person {
9 constructor(public name: string, public email: string) {}
10
11 getName(): string {
12 return this.name;
13 }
14
15 getEmail(): string {
16 return this.email;
17 }
18}
19
20class Admin implements Person {
21 constructor(public name: string, public email: string) {}
22
23 getName(): string {
24 return this.name;
25 }
26
27 getEmail(): string {
28 return this.email;
29 }
30}
31

Before

program
class_declaration
class "class"
type_identifier "User"
class_body (+66 nodes collapsed)
class_declaration
class "class"
type_identifier "Admin"
class_body (+66 nodes collapsed)

After

program
interface_declaration
interface "interface"
type_identifier "Person"
interface_body
{ "{"
property_signature
property_identifier "name"
type_annotation
: ":"
predefined_type
string "string"
; ";"
property_signature
property_identifier "email"
type_annotation
: ":"
predefined_type
string "string"
; ";"
method_signature
property_identifier "getName"
formal_parameters
( "("
) ")"
type_annotation
: ":"
predefined_type
string "string"
; ";"
method_signature
property_identifier "getEmail"
formal_parameters
( "("
) ")"
type_annotation
: ":"
predefined_type
string "string"
; ";"
} "}"
class_declaration
class "class"
type_identifier "User"
class_heritage
implements_clause
implements "implements"
type_identifier "Person"
class_body (+66 nodes collapsed)
class_declaration
class "class"
type_identifier "Admin"
class_heritage
implements_clause
implements "implements"
type_identifier "Person"
class_body (+66 nodes collapsed)