Skip to content

Commit 84aca67

Browse files
fix: typescript 3.9.3 compilation (#831)
This is the first known case where the compilation is fixed by _removing_ `any` and not by _adding_ one. TypeScript is becoming perfect in handling types :)
1 parent e5df376 commit 84aca67

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

packages/packages/google-gax/test/browser-test/test.grpc-fallback.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ describe('createStub', () => {
8484
});
8585

8686
it('should create a stub', async () => {
87-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
88-
const echoStub: any = await gaxGrpc.createStub(echoService, stubOptions);
87+
const echoStub = await gaxGrpc.createStub(echoService, stubOptions);
8988

9089
assert(echoStub instanceof protobuf.rpc.Service);
9190

@@ -102,11 +101,7 @@ describe('createStub', () => {
102101
});
103102

104103
it('should support optional parameters', async () => {
105-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
106-
const echoStub: any = await gaxGrpc.createStub(
107-
echoService,
108-
stubExtraOptions
109-
);
104+
const echoStub = await gaxGrpc.createStub(echoService, stubExtraOptions);
110105

111106
assert(echoStub instanceof protobuf.rpc.Service);
112107

packages/packages/google-gax/test/unit/grpc-fallback.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ describe('createStub', () => {
8989
});
9090

9191
it('should create a stub', async () => {
92-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
93-
const echoStub: any = await gaxGrpc.createStub(echoService, stubOptions);
92+
const echoStub = await gaxGrpc.createStub(echoService, stubOptions);
9493

9594
assert(echoStub instanceof protobuf.rpc.Service);
9695

@@ -107,11 +106,7 @@ describe('createStub', () => {
107106
});
108107

109108
it('should support optional parameters', async () => {
110-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
111-
const echoStub: any = await gaxGrpc.createStub(
112-
echoService,
113-
stubExtraOptions
114-
);
109+
const echoStub = await gaxGrpc.createStub(echoService, stubExtraOptions);
115110

116111
assert(echoStub instanceof protobuf.rpc.Service);
117112

0 commit comments

Comments
 (0)