Skip to content

Commit

Permalink
Merge pull request #124 from kaznovac/fix-ts-definition
Browse files Browse the repository at this point in the history
fix(core) use NodeJS ReadableStream instead of DOM in TS definitions
  • Loading branch information
xavdid authored Dec 13, 2019
2 parents 62c30a1 + 650155b commit fe67c67
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 fe67c67

Please sign in to comment.