|
| 1 | +tests/cases/compiler/weird.js(1,1): error TS2304: Cannot find name 'someFunction'. |
| 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'? |
| 9 | + |
| 10 | + |
| 11 | +==== tests/cases/compiler/weird.js (8 errors) ==== |
| 12 | + someFunction(function(BaseClass) { |
| 13 | + ~~~~~~~~~~~~ |
| 14 | +!!! error TS2304: Cannot find name 'someFunction'. |
| 15 | + ~~~~~~~~~ |
| 16 | +!!! error TS7006: Parameter 'BaseClass' implicitly has an 'any' type. |
| 17 | + 'use strict'; |
| 18 | + class Hello extends BaseClass { |
| 19 | + const DEFAULT_MESSAGE = "nop!"; |
| 20 | + ~~~~~ |
| 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 | +!!! 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 | + } |
| 41 | + }); |
| 42 | + |
0 commit comments