-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Types of property 'isOptimistic' are incompatible. Type 'boolean' is not assignable to type 'true' in EntityCollectionServiceBase after upgrade from @ngrx/data v10.1.2 to v11.0.0 #2928
Comments
@yharaskrik any ideas here? I think we introduced a fix for this already |
Oh Hmm good question. What we did was type function such that if isOptimistic is false then it takes Partial, there must be a conflict somewhere, maybe it doesn't work when explicitly passing true since true is the default? I don't think I actually ever tried that case... I'll see if I can find some time today to check out the typings! |
Additional overload for `.add()` on NgRx Data Service causes issue when passing in `boolean` to `isOptimistic`. Remove overload as it should not be needed. Resolves ngrx#2928
@brandonroberts I loosened up the typings on the add function. @rob4226 I pasted your code into the data-example-app to ensure your passthrough function worked as expected, it seemed too. |
Thanks @yharaskrik! |
No problem! Hopefully this doesn't cause any other problems but it shouldn't as the original signature is very open. 🤷♂️ |
Additional overload for `.add()` on NgRx Data Service causes issue when passing in `boolean` to `isOptimistic`. Remove overload as it should not be needed. Resolves #2928
@yharaskrik @brandonroberts Thanks for your help guys!! |
You are welcome! |
hi, add(entity: Partial, options: EntityActionOptions & { |
Hi,
I just upgraded @ngrx/data from v10.1.2 to v11.0.0 but now in my class that overrides
EntityCollectionServiceBase
I get a TypeScript compile error:I think it has something to do with #2899 and #2906.
Here is my code:
Just as a test to try to get the signatures right, I replaced my overridden code for
add()
with theadd()
function code directly from the ngrx/data source code I get another error:All I want to do is pass along the optional argument
options
to the parent function like I did in v10.1.2. How do I clear the error? Thank you!!The text was updated successfully, but these errors were encountered: