-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Argument of type 'readonly string[]' is not assignable to parameter of type 'string[]'. #22
Comments
Can change function assignCats(cats: string[] | readonly string[], owner: string) {
return
}
Possible to remove |
@nordowl does it make sense to return regular data without |
I think having to specify For now what I've done is use type casting with Having mutable array types would make things a little easier in my opinion. |
@nordowl I guess it's not really needed, will remove it in a new version. |
@nordowl will be released when https://github.com/asmyshlyaev177/state-in-url/actions/runs/11758298425 pass, issues closing automatically, not sure why. |
@asmyshlyaev177 Thanks, I appreciate it! |
It's released few minutes ago. |
Describe the bug
I want to pass an
urlState
property of typestring[]
to a function. But that produces a TS error, becauseurlState
usesreadonly
properties.To Reproduce
Just some pseudo code
Trying to pass
urlState.cats
as thecats
parameter throws:Expected behavior
No errors.
The text was updated successfully, but these errors were encountered: