Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts(4113) and ts(4117) are formatted incorrectly #82

Open
jackssrt opened this issue Oct 6, 2023 · 0 comments
Open

ts(4113) and ts(4117) are formatted incorrectly #82

jackssrt opened this issue Oct 6, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jackssrt
Copy link

jackssrt commented Oct 6, 2023

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)

Screenshots
ts(4113) error being incorrectly formatted
ts(4117) error being incorrectly formatted

@jackssrt jackssrt added the bug Something isn't working label Oct 6, 2023
@yoavbls yoavbls added the help wanted Extra attention is needed label Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants