Skip to content

Commit

Permalink
Loosen up BatchLoadFn type definition Promise -> PromiseLike (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser authored and leebyron committed Nov 13, 2019
1 parent bf23eb9 commit 80396ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.d.ts
Expand Up @@ -70,7 +70,7 @@ declare namespace DataLoader {

// A Function, which when given an Array of keys, returns a Promise of an Array
// of values or Errors.
export type BatchLoadFn<K, V> = (keys: K[]) => Promise<Array<V | Error>>;
export type BatchLoadFn<K, V> = (keys: K[]) => PromiseLike<Array<V | Error>>;

// Optionally turn off batching or caching or provide a cache key function or a
// custom cache instance.
Expand Down

0 comments on commit 80396ee

Please sign in to comment.