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

Why not set dispatch type as async ? #261

Open
adelin-b opened this issue Oct 19, 2020 · 1 comment
Open

Why not set dispatch type as async ? #261

adelin-b opened this issue Oct 19, 2020 · 1 comment

Comments

@adelin-b
Copy link

// index.d.ts
  /**
   * Dispatch an action to the background using messaging passing
   * @param data The action data to dispatch
   * 
   * Note: Although the return type is specified as the action, react-chrome-redux will
   * wrap the result in a responsePromise that will resolve/reject based on the
   * action response from the background page
   */
  dispatch<A>(data: A): A;

Why not doing
dispatch<A>(data: A): Promise<A>

@chan-dev
Copy link

chan-dev commented Nov 3, 2022

Any update on this one?

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

2 participants