Skip to content

Commit

Permalink
chore(internal): remove unused streaming implementation (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored and chen-annie committed Jul 13, 2023
1 parent 699a630 commit 3665f89
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 281 deletions.
7 changes: 0 additions & 7 deletions src/core.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as qs from 'qs';
import { VERSION } from './version';
import { Stream } from './streaming';
import { APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError } from './error';
import type { Readable } from 'modern-treasury/_shims/node-readable';
import { getDefaultAgent, type Agent } from 'modern-treasury/_shims/agent';
Expand Down Expand Up @@ -252,12 +251,6 @@ export abstract class APIClient {
throw err;
}

if (options.stream) {
// Note: there is an invariant here that isn't represented in the type system
// that if you set `stream: true` the response type must also be `Stream<T>`
return new Stream<Rsp>(response, controller) as any;
}

const contentType = response.headers.get('content-type');
if (contentType?.includes('application/json')) {
const json = await response.json();
Expand Down
274 changes: 0 additions & 274 deletions src/streaming.ts

This file was deleted.

0 comments on commit 3665f89

Please sign in to comment.