From f363caeb65efb0a31ebf3e77d4641e3e89168fd0 Mon Sep 17 00:00:00 2001 From: fent Date: Sat, 8 Jan 2022 18:16:03 -0700 Subject: [PATCH] fix: fix compiling for @types/node@17 fixes #65 --- package-lock.json | 30 +++++++----------------------- package.json | 2 +- src/index.ts | 2 +- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 528d54e..908274a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "@types/mocha": "^7.0.0", - "@types/node": "^14.14.9", + "@types/node": "^17.0.8", "@types/sinon": "^9.0.8", "@typescript-eslint/eslint-plugin": "^4.8.2", "@typescript-eslint/parser": "^4.8.2", @@ -402,9 +402,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", - "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==", + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", + "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", "dev": true }, "node_modules/@types/sinon": { @@ -3367,13 +3367,6 @@ "@types/node": "*" } }, - "node_modules/stream-equal/node_modules/@types/node": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", - "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==", - "dev": true, - "optional": true - }, "node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -4365,9 +4358,9 @@ "dev": true }, "@types/node": { - "version": "14.14.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", - "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==", + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", + "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", "dev": true }, "@types/sinon": { @@ -6735,15 +6728,6 @@ "dev": true, "requires": { "@types/node": "*" - }, - "dependencies": { - "@types/node": { - "version": "14.0.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", - "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==", - "dev": true, - "optional": true - } } }, "string-width": { diff --git a/package.json b/package.json index 5f80551..3eade2a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "devDependencies": { "@types/mocha": "^7.0.0", - "@types/node": "^14.14.9", + "@types/node": "^17.0.8", "@types/sinon": "^9.0.8", "@typescript-eslint/eslint-plugin": "^4.8.2", "@typescript-eslint/parser": "^4.8.2", diff --git a/src/index.ts b/src/index.ts index dcc034f..57c52a3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,7 +40,7 @@ namespace Miniget { export interface Stream extends PassThrough { abort: (err?: Error) => void; aborted: boolean; - destroy: (err?: Error) => void; + destroy: (err?: Error) => this; destroyed: boolean; text: () => Promise; on(event: 'reconnect', listener: (attempt: number, err?: Miniget.MinigetError) => void): this;