Skip to content

Commit 93a0445

Browse files
stainless-botRobertCraigie
authored andcommitted
refactor: mark .responseHeaders and .response as deprecated
1 parent 2b4bce4 commit 93a0445

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ export type FinalRequestOptions<Req extends {} = Record<string, unknown> | Reada
572572
};
573573

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

src/streaming.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class SSEDecoder {
6565
}
6666

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

0 commit comments

Comments
 (0)