tshaddix / webext-redux

A set of utilities for building Redux applications in Web Extensions.
MIT License
1.22k stars 179 forks source link

Why not set dispatch type as async ? #261

Open adelin-b opened 3 years ago

adelin-b commented 3 years ago
// 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 commented 1 year ago

Any update on this one?