We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67a4b65 commit 4c8bfc5Copy full SHA for 4c8bfc5
src/core.ts
@@ -98,8 +98,10 @@ export class APIPromise<T> extends Promise<T> {
98
});
99
}
100
101
- _thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
102
- return new APIPromise(this.responsePromise, async (props) => transform(await this.parseResponse(props)));
+ _thenUnwrap<U>(transform: (data: T, props: APIResponseProps) => U): APIPromise<U> {
+ return new APIPromise(this.responsePromise, async (props) =>
103
+ transform(await this.parseResponse(props), props),
104
+ );
105
106
107
/**
0 commit comments