From d2ef2a4b6ba8352ff398e4d29aa1a7a08c09738b Mon Sep 17 00:00:00 2001 From: zondervancalvez Date: Tue, 22 Feb 2022 17:53:15 +0800 Subject: [PATCH] style: 2021-09-20 linter warnings batch 23/26 Fixes: hyperledger#1371 Signed-off-by: zondervancalvez --- .../src/main/typescript/besu/besu-test-ledger.ts | 6 +++--- .../cactus-keychain-vault-server.ts | 4 ++-- .../src/main/typescript/common/streams.ts | 2 +- .../src/main/typescript/fabric/fabric-test-ledger-v1.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts index cffa9f7e10..bf9cb41e00 100644 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts @@ -114,14 +114,14 @@ export class BesuTestLedger implements ITestLedger { } public async getFileContents(filePath: string): Promise { - const response: any = await this.getContainer().getArchive({ + const response = await this.getContainer().getArchive({ path: filePath, }); const extract: tar.Extract = tar.extract({ autoDestroy: true }); return new Promise((resolve, reject) => { let fileContents = ""; - extract.on("entry", async (header: any, stream, next) => { + extract.on("entry", async (header: unknown, stream, next) => { stream.on("error", (err: Error) => { reject(err); }); @@ -391,7 +391,7 @@ export class BesuTestLedger implements ITestLedger { private pullContainerImage(containerNameAndTag: string): Promise { return new Promise((resolve, reject) => { const docker = new Docker(); - docker.pull(containerNameAndTag, (pullError: unknown, stream: any) => { + docker.pull(containerNameAndTag, (pullError: unknown, stream: never) => { if (pullError) { reject(pullError); } else { diff --git a/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts b/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts index fe7889d1c6..5d09644059 100644 --- a/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts +++ b/packages/cactus-test-tooling/src/main/typescript/cactus-keychain-vault-server/cactus-keychain-vault-server.ts @@ -109,8 +109,8 @@ export class CactusKeychainVaultServer { }); } - public async stop(): Promise { - await Containers.stop(this.container as any); + public async stop(): Promise { + await Containers.stop(this.container as Container); } public destroy(): Promise { diff --git a/packages/cactus-test-tooling/src/main/typescript/common/streams.ts b/packages/cactus-test-tooling/src/main/typescript/common/streams.ts index 3d2ae6a720..06f1c712c7 100644 --- a/packages/cactus-test-tooling/src/main/typescript/common/streams.ts +++ b/packages/cactus-test-tooling/src/main/typescript/common/streams.ts @@ -20,7 +20,7 @@ export class Streams { return new Promise((resolve, reject) => { stream.on("data", (buffer: Buffer) => { - const item = buffer.toString(encoding) as any; + const item = (buffer.toString(encoding) as unknown) as T; data.push(item); }); diff --git a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts index ed17b2be75..3fa4fa4018 100644 --- a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts +++ b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts @@ -1366,7 +1366,7 @@ export class FabricTestLedgerV1 implements ITestLedger { } while (!reachable); } - public stop(): Promise { + public stop(): Promise { return Containers.stop(this.container as Container); }