tshaddix / webext-redux

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

Why not set dispatch type as async ? #261

Open adelin-b opened 4 years ago

adelin-b commented 4 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 2 years ago

Any update on this one?