Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit 3c2eb48

Browse files
fix: enable new gax.lro() (#251)
1 parent 4c8b242 commit 3c2eb48

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@ export {BundleDescriptor, BundleExecutor} from './bundling';
4444
export {PathTemplate} from './path_template';
4545
export {PageDescriptor} from './paged_iteration';
4646
export {createApiCall} from './api_callable';
47+
export {GrpcClient, GrpcClientOptions, GrpcModule, GoogleProtoFilesRoot, Metadata, MetadataValue, Stub, StubOptions} from './grpc';
4748

48-
const grpc = require('./grpc');
49+
import {GrpcClient, GrpcClientOptions} from './grpc';
4950

50-
function lro(options: {}) {
51+
function lro(options: GrpcClientOptions) {
5152
options = extend(
5253
{
5354
// tslint:disable-next-line no-any
5455
scopes: (lro as any).ALL_SCOPES,
5556
},
5657
options);
57-
const gaxGrpc = grpc(options);
58+
const gaxGrpc = new GrpcClient(options);
5859
return new operationsClient.OperationsClientBuilder(gaxGrpc);
5960
}
6061
// tslint:disable-next-line no-any
@@ -63,6 +64,5 @@ function lro(options: {}) {
6364
(lro as any).ALL_SCOPES = operationsClient.ALL_SCOPES;
6465

6566
export {lro};
66-
export {grpc};
67-
exports.createByteLengthFunction = grpc.createByteLengthFunction;
68-
exports.version = require('../../package.json').version;
67+
export const createByteLengthFunction = GrpcClient.createByteLengthFunction;
68+
export const version = require('../../package.json').version;

src/operations_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const PAGE_DESCRIPTORS = {
5454
* The scopes needed to make gRPC calls to all of the methods defined in
5555
* this service.
5656
*/
57-
export const ALL_SCOPES = [];
57+
export const ALL_SCOPES: string[] = [];
5858

5959
/**
6060
* Manages long-running operations with an API service.

0 commit comments

Comments
 (0)