From 5ef8aa8d308f7374dd01d8079cd76e0d96999ec2 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Tue, 8 Oct 2024 13:42:35 +0000 Subject: [PATCH] chore(internal): pass props through internal parser (#1125) --- src/core.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.ts b/src/core.ts index c104b61d1..d78e9e926 100644 --- a/src/core.ts +++ b/src/core.ts @@ -116,9 +116,9 @@ export class APIPromise extends Promise> { }); } - _thenUnwrap(transform: (data: T) => U): APIPromise { + _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { return new APIPromise(this.responsePromise, async (props) => - _addRequestID(transform(await this.parseResponse(props)), props.response), + _addRequestID(transform(await this.parseResponse(props), props), props.response), ); }