We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f8b872 commit 6cdc77dCopy full SHA for 6cdc77d
src/core.ts
@@ -116,9 +116,9 @@ export class APIPromise<T> extends Promise<WithRequestID<T>> {
116
});
117
}
118
119
- _thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
+ _thenUnwrap<U>(transform: (data: T, props: APIResponseProps) => U): APIPromise<U> {
120
return new APIPromise(this.responsePromise, async (props) =>
121
- _addRequestID(transform(await this.parseResponse(props)), props.response),
+ _addRequestID(transform(await this.parseResponse(props), props), props.response),
122
);
123
124
0 commit comments