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

CustomCommands type error #150

Closed
zhanba opened this issue Dec 24, 2019 · 2 comments
Closed

CustomCommands type error #150

zhanba opened this issue Dec 24, 2019 · 2 comments

Comments

@zhanba
Copy link

zhanba commented Dec 24, 2019

interface UpdateArray {
  $updateArrayById: string;
}

export function myUpdate<T>(object: T, spec: Spec<T, CustomCommands<UpdateArray>>) {
  // Type instantiation is excessively deep and possibly infinite. ts(2589)
  return update(object, spec);
}
@cinnamennen
Copy link

I ran into this, try doing

export function myUpdate<T>(object: T, spec: Spec<T, CustomCommands<UpdateArray>>) {
  // Type instantiation is excessively deep and possibly infinite. ts(2589)
  return update<T, CustomCommands<UpdateArray>>(object, spec);
}

@zhanba
Copy link
Author

zhanba commented Jan 26, 2020

@cinnamennen thx, it's working!

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

3 participants