Skip to content

Commit

Permalink
declaration for onDone on autoPagingEach and autoPagingToArray (#1098)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaznovac committed Feb 26, 2022
1 parent 2d75754 commit 1f4c4b0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions types/lib.d.ts
Expand Up @@ -213,10 +213,14 @@ declare module 'stripe' {
extends Promise<Response<ApiList<T>>>,
AsyncIterableIterator<T> {
autoPagingEach(
handler: (item: T) => boolean | void | Promise<boolean | void>
handler: (item: T) => boolean | void | Promise<boolean | void>,
onDone?: (err: any) => void
): Promise<void>;

autoPagingToArray(opts: {limit: number}): Promise<Array<T>>;
autoPagingToArray(
opts: {limit: number},
onDone?: (err: any) => void
): Promise<Array<T>>;
}

/**
Expand Down

0 comments on commit 1f4c4b0

Please sign in to comment.