Skip to content

Commit

Permalink
refactor: mark .responseHeaders and .response as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and RobertCraigie committed Jul 7, 2023
1 parent 2b4bce4 commit 93a0445
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ export type FinalRequestOptions<Req extends {} = Record<string, unknown> | Reada
};

export type APIResponse<T> = T & {
/** @deprecated - we plan to add a different way to access raw response information shortly. */
responseHeaders: Headers;
};

Expand Down
2 changes: 2 additions & 0 deletions src/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ class SSEDecoder {
}

export class Stream<Item> implements AsyncIterable<Item>, APIResponse<Stream<Item>> {
/** @deprecated - please use the async iterator instead. We plan to add additional helper methods shortly. */
response: Response;
/** @deprecated - we plan to add a different way to access raw response information shortly. */
responseHeaders: Headers;
controller: AbortController;

Expand Down

0 comments on commit 93a0445

Please sign in to comment.