Skip to content

Commit

Permalink
* use NodeJS.ReadableStream instead of ReadableStream from DOM
Browse files Browse the repository at this point in the history
* set node tsconfig recommended settings for node 10.x
* explicitly provide only es2018 lib in tsc (to avoid accidental importing of DOM modules)
  • Loading branch information
kaznovac committed Dec 13, 2019
1 parent c370a63 commit 650155b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion example-apps/typescript/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"compilerOptions": {
"target": "es6",
"target": "es2018",
"module": "commonjs",
"lib": [
"es2018"
],
"outDir": "./lib",
"rootDir": "./src",
"strict": true
Expand Down
6 changes: 3 additions & 3 deletions packages/core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ declare class RefreshAuthError extends Error {}
// copied http stuff from external typings
export interface HttpRequestOptions {
agent?: Agent;
body?: string | Buffer | ReadableStream | object;
body?: string | Buffer | NodeJS.ReadableStream | object;
compress?: boolean;
follow?: number;
form?: object;
Expand Down Expand Up @@ -103,7 +103,7 @@ export interface HttpResponse extends BaseHttpResponse {
export interface RawHttpResponse extends BaseHttpResponse {
content: Buffer;
json: Promise<object | undefined>;
body: ReadableStream;
body: NodeJS.ReadableStream;
}

export interface ZObject {
Expand Down Expand Up @@ -138,7 +138,7 @@ export interface ZObject {
*/
stashFile: {
(
input: string | Buffer | ReadableStream,
input: string | Buffer | NodeJS.ReadableStream,
knownLength?: number,
filename?: string,
contentType?: string
Expand Down

0 comments on commit 650155b

Please sign in to comment.