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-app[bot] authored Oct 8, 2024
1 parent 67a4b65 commit 4c8bfc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ export class APIPromise<T> extends Promise<T> {
});
}

_thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
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) =>
transform(await this.parseResponse(props), props),
);
}

/**
Expand Down

0 comments on commit 4c8bfc5

Please sign in to comment.