Closed
Description
TypeScript Version: 2.2.0
Code
class Foo {
bar: "boop";
}
class Buzz extends Foo {
bar = 'boop'
}
Expected behavior:
Compiles without error.
Actual behavior:
Class 'Buzz' incorrectly extends base class 'Foo'.
Types of property 'bar' are incompatible.
Type 'string' is not assignable to type '"boop"'.
Apologies if I'm missing something obvious, this is by design, or there are existing issues for this. I searched and didn't find anything like it.