@@ -21,7 +21,8 @@ import is from '@sindresorhus/is';
2121import * as extend from 'extend' ;
2222import { GoogleAuth } from 'google-auth-library' ;
2323import * as gax from 'google-gax' ;
24- import * as grpc from 'grpc' ;
24+ import * as grpc from '@grpc/grpc-js' ;
25+ import { ServiceError , ChannelCredentials } from '@grpc/grpc-js' ;
2526
2627const PKG = require ( '../../package.json' ) ;
2728const v1 = require ( './v1' ) ;
@@ -46,7 +47,6 @@ import {PublishOptions} from './publisher';
4647import { CallOptions } from 'google-gax' ;
4748import { Transform } from 'stream' ;
4849import { google } from '../proto/pubsub' ;
49- import { ServiceError , ChannelCredentials } from 'grpc' ;
5050
5151const opts = { } as gax . GrpcClientOptions ;
5252
@@ -263,10 +263,6 @@ export class PubSub {
263263 }
264264 this . options = Object . assign (
265265 {
266- grpc,
267- 'grpc.keepalive_time_ms' : 300000 ,
268- 'grpc.max_send_message_length' : - 1 ,
269- 'grpc.max_receive_message_length' : 20000001 ,
270266 libName : 'gccl' ,
271267 libVersion : PKG . version ,
272268 scopes : Object . keys ( allScopes ) ,
@@ -932,7 +928,7 @@ export class PubSub {
932928 request < T , R = void > ( config : RequestConfig , callback : RequestCallback < T , R > ) {
933929 this . getClient_ ( config , ( err , client ) => {
934930 if ( err ) {
935- callback ( err ) ;
931+ callback ( err as ServiceError ) ;
936932 return ;
937933 }
938934 let reqOpts = extend ( true , { } , config . reqOpts ) ;
0 commit comments