Skip to content

Commit

Permalink
fix: typescript 3.9.3 compilation (#831)
Browse files Browse the repository at this point in the history
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 :)
  • Loading branch information
alexander-fenster committed May 20, 2020
1 parent 90034ce commit d53e169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions test/browser-test/test.grpc-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ describe('createStub', () => {
});

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

assert(echoStub instanceof protobuf.rpc.Service);

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

it('should support optional parameters', async () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const echoStub: any = await gaxGrpc.createStub(
echoService,
stubExtraOptions
);
const echoStub = await gaxGrpc.createStub(echoService, stubExtraOptions);

assert(echoStub instanceof protobuf.rpc.Service);

Expand Down
9 changes: 2 additions & 7 deletions test/unit/grpc-fallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ describe('createStub', () => {
});

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

assert(echoStub instanceof protobuf.rpc.Service);

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

it('should support optional parameters', async () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const echoStub: any = await gaxGrpc.createStub(
echoService,
stubExtraOptions
);
const echoStub = await gaxGrpc.createStub(echoService, stubExtraOptions);

assert(echoStub instanceof protobuf.rpc.Service);

Expand Down

0 comments on commit d53e169

Please sign in to comment.