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

Type of store.update TransformBuilder is unclear #472

Closed
burabure opened this issue Oct 31, 2017 · 1 comment · Fixed by #563
Closed

Type of store.update TransformBuilder is unclear #472

burabure opened this issue Oct 31, 2017 · 1 comment · Fixed by #563

Comments

@burabure
Copy link
Contributor

given the following code

store.update((t: TransformBuilder) =>
  t.replaceAttribute({ type: 'order', id: payload.orderId }, 'totalPaid', totalPaid)
)

I get the following error:

TS2345: Argument of type '(t: TransformBuilder) => ReplaceAttributeOperation' is not assignable to parameter of type 'TransformOrOperations'.
  Type '(t: TransformBuilder) => ReplaceAttributeOperation' is not assignable to type 'TransformBuilderFunc'.
    Type 'ReplaceAttributeOperation' is not assignable to type 'Operation[]'.
      Property 'length' is missing in type 'ReplaceAttributeOperation'.

What's the correct type for t ?, I've looked at the source and It should be TransformBuilder but it doesn't work

@burabure
Copy link
Contributor Author

burabure commented Nov 7, 2017

@dgeb @opsb could you give me a hand here?

Raiondesu added a commit to Raiondesu/orbit that referenced this issue Dec 27, 2018
This commit effectively fixes orbitjs#472
@Raiondesu Raiondesu mentioned this issue Dec 27, 2018
@dgeb dgeb closed this as completed in #563 Dec 29, 2018
dgeb added a commit that referenced this issue Dec 29, 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

Successfully merging a pull request may close this issue.

1 participant