|
1 | 1 | tests/cases/compiler/weird.js(1,1): error TS2304: Cannot find name 'someFunction'.
|
2 | 2 | tests/cases/compiler/weird.js(1,23): error TS7006: Parameter 'BaseClass' implicitly has an 'any' type.
|
3 |
| -tests/cases/compiler/weird.js(4,17): error TS8009: 'const' can only be used in a .ts file. |
4 |
| -tests/cases/compiler/weird.js(4,17): error TS1248: A class member cannot have the 'const' keyword. |
5 |
| -tests/cases/compiler/weird.js(5,3): error TS2377: Constructors for derived classes must contain a 'super' call. |
6 |
| -tests/cases/compiler/weird.js(6,4): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. |
7 |
| -tests/cases/compiler/weird.js(8,25): error TS7006: Parameter 'error' implicitly has an 'any' type. |
8 |
| -tests/cases/compiler/weird.js(9,54): error TS2663: Cannot find name 'DEFAULT_MESSAGE'. Did you mean the instance member 'this.DEFAULT_MESSAGE'? |
| 3 | +tests/cases/compiler/weird.js(6,13): error TS2346: Supplied parameters do not match any signature of call target. |
| 4 | +tests/cases/compiler/weird.js(9,17): error TS7006: Parameter 'error' implicitly has an 'any' type. |
9 | 5 |
|
10 | 6 |
|
11 |
| -==== tests/cases/compiler/weird.js (8 errors) ==== |
| 7 | +==== tests/cases/compiler/weird.js (4 errors) ==== |
12 | 8 | someFunction(function(BaseClass) {
|
13 | 9 | ~~~~~~~~~~~~
|
14 | 10 | !!! error TS2304: Cannot find name 'someFunction'.
|
15 | 11 | ~~~~~~~~~
|
16 | 12 | !!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type.
|
17 |
| - 'use strict'; |
18 |
| - class Hello extends BaseClass { |
19 |
| - const DEFAULT_MESSAGE = "nop!"; |
| 13 | + 'use strict'; |
| 14 | + const DEFAULT_MESSAGE = "nop!"; |
| 15 | + class Hello extends BaseClass { |
| 16 | + constructor() { |
| 17 | + super(); |
| 18 | + ~~~~~~~ |
| 19 | +!!! error TS2346: Supplied parameters do not match any signature of call target. |
| 20 | + this.foo = "bar"; |
| 21 | + } |
| 22 | + _render(error) { |
20 | 23 | ~~~~~
|
21 |
| -!!! error TS8009: 'const' can only be used in a .ts file. |
22 |
| - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
23 |
| -!!! error TS1248: A class member cannot have the 'const' keyword. |
24 |
| - constructor() { |
25 |
| - ~~~~~~~~~~~~~~~ |
26 |
| - this.foo = "bar"; |
27 |
| - ~~~~~~~~~~~~~~~~~~~~ |
28 |
| - ~~~~ |
29 |
| -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. |
30 |
| - } |
31 |
| - ~~~ |
32 |
| -!!! error TS2377: Constructors for derived classes must contain a 'super' call. |
33 |
| - _render(error) { |
34 |
| - ~~~~~ |
35 | 24 | !!! error TS7006: Parameter 'error' implicitly has an 'any' type.
|
36 |
| - const message = error.message || DEFAULT_MESSAGE; |
37 |
| - ~~~~~~~~~~~~~~~ |
38 |
| -!!! error TS2663: Cannot find name 'DEFAULT_MESSAGE'. Did you mean the instance member 'this.DEFAULT_MESSAGE'? |
39 |
| - } |
40 |
| - } |
| 25 | + const message = error.message || DEFAULT_MESSAGE; |
| 26 | + } |
| 27 | + } |
41 | 28 | });
|
42 | 29 |
|
0 commit comments