Skip to content

Commit

Permalink
chore(internal): pass props through internal parser (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stainless Bot committed Oct 8, 2024
1 parent 7f8b872 commit 5ef8aa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ export class APIPromise<T> extends Promise<WithRequestID<T>> {
});
}

_thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
_thenUnwrap<U>(transform: (data: T, props: APIResponseProps) => U): APIPromise<U> {
return new APIPromise(this.responsePromise, async (props) =>
_addRequestID(transform(await this.parseResponse(props)), props.response),
_addRequestID(transform(await this.parseResponse(props), props), props.response),
);
}

Expand Down

0 comments on commit 5ef8aa8

Please sign in to comment.