TS1029
error TS1029: ‘public’ modifier must precede ‘abstract’ modifier.
Broken Code ❌
1 |
|
Fixed Code ✔️
They keywords public
, private
, and protected
define the access to a class member. Access modifiers have to be defined first in TypeScript.
Solution 1:
1 |
|
Solution 2:
The visibility is public
by default, so you don’t have to explicitly declare it:
1 |
|