/
classes.expected.js
142 lines (142 loc) · 3.88 KB
/
classes.expected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
class Becky extends Error {
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
this.message = message;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
}
}
}
class Ellie extends Becky {}
class Casey extends Error {
constructor(Bruno, Sammy) {
super(Bruno, Sammy);
this.name = this.constructor.name;
this.message = Bruno;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Bruno).stack;
}
}
}
class Belle extends Error {
constructor(message, options) {
super(message, options);
this.name = this.constructor.name;
this.message = message;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(message).stack;
}
console.log(Mimi);
}
}
class Jasper extends Error {
constructor(Cooper, options) {
super(Cooper, options);
this.name = this.constructor.name;
this.message = Cooper;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Cooper).stack;
}
console.log(Cooper);
}
}
class Rufus extends Error {
constructor(Scout, options) {
super(Scout, options);
this.name = this.constructor.name;
this.message = Scout;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Scout).stack;
}
console.log(Scout);
}
}
class Rosie extends Error {
constructor(Bentley, Olive) {
super(Bentley, Olive);
this.name = this.constructor.name;
this.message = Bentley;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Bentley).stack;
}
console.log(Bentley, Olive);
}
}
class Josie extends Error {
constructor(Daisy = 'Daisy', options) {
super(Daisy, options);
this.name = this.constructor.name;
this.message = Daisy;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Daisy).stack;
}
console.log(Daisy);
}
}
class Lady extends Error {
constructor(Chase = 'Chase', Izzy) {
super(Chase, Izzy);
this.name = this.constructor.name;
this.message = Chase;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Chase).stack;
}
console.log(Chase, Izzy);
}
}
class Gizmo {}
class Hannah extends Error {
constructor(Tucker = 'Tucker', options) {
super(Charlie, options);
this.name = this.constructor.name;
this.message = Charlie;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Charlie).stack;
}
console.log(Tucker);
}
}
class Oreo extends Error {
constructor(Max = 'Max', Molly = 'Molly') {
super(Rex, Baxter);
this.name = this.constructor.name;
this.message = Rex;
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(Rex).stack;
}
console.log(Max, Molly);
}
}
class Chico extends Error {
constructor(...args) {
super(args["0"], args["1"]);
this.name = this.constructor.name;
this.message = args["0"];
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = new Error(args["0"]).stack;
}
}
}