TypeScript/tests/cases/compiler/baseClassImprovedMismatchErrors.ts
Wesley Wigham fdd8a52240
Offer per-member diagnostics for incorrectly implemented inherited members (#21036)
* Offer per-member diagnostics for incorrectly implemented inherited members on classes

* Revise error message, make containingChain a thunk

* Fix typo in comment
2018-01-09 10:20:07 -08:00

18 lines
332 B
TypeScript

class Base {
n: Base | string;
fn() {
return 10;
}
}
class Derived extends Base {
n: Derived | string;
fn() {
return 10 as number | string;
}
}
class DerivedInterface implements Base {
n: DerivedInterface | string;
fn() {
return 10 as number | string;
}
}