TypeScript Version: 3.8.3
Search Terms:
implement class protected members
Code
class A {
protected a: string = '';
}
class B implements A {
protected a: string = '';
}
Expected behavior:
No errors
Actual behavior:
Error: Class 'B' incorrectly implements class 'A'. Did you mean to extend 'A' and inherit its members as a subclass?
Property 'a' is protected but type 'B' is not a class derived from 'A'.
This is the intended behavior, as noted by the fact that there's a special error message just for it 馃槈