Describe the bug
ts(4113) and ts(4117) are formatted incorrectly if the base class is generic and there are quotes in the base class part of the error.
For example:
ts(4113)
class A<T extends string> {}
class B<T extends { nested: string }> extends A<T["nested"]> {
override test: any;
}
ts(4117)
class A<T extends string> {
public testA: any;
}
class B<T extends { nested: string }> extends A<T["nested"]> {
override test: any;
}
Expected behavior
It should probably be formatted as:
This member cannot have an override modifier because it is not declared in the base class A<T["nested"]>. ts(4113)
and
This member cannot have an override modifier because it is not declared in the base class A<T["nested"]>. Did you mean testA?ts(4117)
Original error
If this bug is related to an error that is not formatting well, please
attach the original error in a code block:
This member cannot have an 'override' modifier because it is not declared in the base class 'A<T["nested"]>'.ts(4113)
This member cannot have an 'override' modifier because it is not declared in the base class 'A<T["nested"]>'. Did you mean 'testA'?ts(4117)
Describe the bug ts(4113) and ts(4117) are formatted incorrectly if the base class is generic and there are quotes in the base class part of the error. For example: ts(4113)
ts(4117)
Expected behavior It should probably be formatted as:
This member cannot have an
override
modifier because it is not declared in the base classA<T["nested"]>
. ts(4113) and This member cannot have anoverride
modifier because it is not declared in the base classA<T["nested"]>
. Did you meantestA
?ts(4117)Original error If this bug is related to an error that is not formatting well, please attach the original error in a code block:
Screenshots
![ts(4117) error being incorrectly formatted](https://github.com/yoavbls/pretty-ts-errors/assets/33695699/f474a4ec-7fcd-4b7f-950d-89bdea4f7084)