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-array' regression for array literals in 5.0.0 #104
Comments
We also find this to be a problem on types defined with If your interface is defined as such: interface SomeType {
readonly array: ReadonlyArray<string>;
readonly nested: {
readonly array: ReadonlyArray<string>;
};
} Then tslint-immutable 5.0.0 will now complain when passed literals such as |
@jonaskello Great. Many thanks! |
@jonaskello, I haven't gotten the chance to test yet, but v5.0.1...master says that the fix was merged after 5.0.1 was released, is that incorrect? |
@astorije Yes, you are correct. Seems I made the release while I was on the fix branch :-/. Also the update of the changelog was done on the wrong branch but I've fixed that now. Although the tag is on the wrong commit I think the published code in 5.0.1 actually contains the fix. I did a npm install of it and it seems to be present in the js code that is installed. Let me know if it doesn't work. |
I just upgraded to v5.0.1 works super now, thanks! |
@phil-lgr Thanks for testing :-) |
Given the following mutable types
SomeArray
/SomeType
, tslint-immutable 5.0.0 emitsreadonly-array
also in the assignment sites (with array literals), but only in theSomeType
(with an object literal) scenario. See the comments in my code snippet.tslint-immutable 4.9.1 didn't do this which was correct IMO (because SomeType is declared as mutable, which is even library code in my real case).
The text was updated successfully, but these errors were encountered: