From d225d1d58b7b859370f550022aff0a8f95fc988a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:37:19 +0000 Subject: [PATCH] chore(internal): pass props through internal parser (#549) --- src/core.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core.ts b/src/core.ts index ae72e081..e1be657d 100644 --- a/src/core.ts +++ b/src/core.ts @@ -98,8 +98,10 @@ export class APIPromise extends Promise { }); } - _thenUnwrap(transform: (data: T) => U): APIPromise { - return new APIPromise(this.responsePromise, async (props) => transform(await this.parseResponse(props))); + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { + return new APIPromise(this.responsePromise, async (props) => + transform(await this.parseResponse(props), props), + ); } /**