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

readonly-keyword fixer does not work for array index signatures #62

Closed
geon opened this issue Jan 10, 2018 · 6 comments
Closed

readonly-keyword fixer does not work for array index signatures #62

geon opened this issue Jan 10, 2018 · 6 comments

Comments

@geon
Copy link
Contributor

geon commented Jan 10, 2018

{ [key: string]: { groups: ReadonlyArray<string> } }

became

{ readonly [key: streadonly groups: ReadonlyArray<string>y<string> } }

should be

{ readonly [key: string]: { readonly groups: ReadonlyArray<string> } }
@jonaskello
Copy link
Owner

@geon I tried to replicate the problem with a test, see commit above. But it passed. I guess you are using this at some other place than an interface declaration?

@geon
Copy link
Contributor Author

geon commented Jan 11, 2018

Looks like you added the test for ReadonlyArray. The issue I had was with the index signatures. The errors are detected just fine, but the fixer mangled the code.

@geon
Copy link
Contributor Author

geon commented Jan 11, 2018

Sent pull request: #63

@jonaskello
Copy link
Owner

Aha, perfect, now it is clear. I'll take another look. Meanwhile feel free to update the PR with a fix if you want :-).

@jonaskello
Copy link
Owner

Could be related to #24.

@geon
Copy link
Contributor Author

geon commented Jan 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants