diff --git a/src/index.d.ts b/src/index.d.ts index 136ad88..f9b22e9 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -17,7 +17,7 @@ */ declare class DataLoader { constructor( - batchLoadFn: DataLoader.BatchLoadFn, + batchLoadFn: DataLoader.BatchLoadFn, options?: DataLoader.Options, ); @@ -80,7 +80,8 @@ 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 = ( + export type BatchLoadFn = ( + this: DataLoader, keys: ReadonlyArray, ) => PromiseLike>;