Skip to content

Commit

Permalink
fix: suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinet18 committed May 26, 2023
1 parent 8bc44ae commit 922f2f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ import {

import { getExportRequestProto } from '../util';

interface ExportRequestType<T, R = T & { toJSON: () => unknown }> {
create(properties?: T): R;
encode(message: T, writer?: protobuf.Writer): protobuf.Writer;
decode(reader: protobuf.Reader | Uint8Array, length?: number): R;
}

/**
* Collector Exporter abstract base class
*/
Expand All @@ -42,12 +36,6 @@ export abstract class OTLPProtoExporterBrowserBase<
super(config);
}

private _getExportRequestProto(
clientType: ServiceClientType
): ExportRequestType<ServiceRequest> {
return getExportRequestProto(clientType);
}

override send(
objects: ExportItem[],
onSuccess: () => void,
Expand All @@ -59,7 +47,7 @@ export abstract class OTLPProtoExporterBrowserBase<
}

const serviceRequest = this.convert(objects);
const exportRequestType = this._getExportRequestProto(
const exportRequestType = getExportRequestProto(
this.getServiceClientType()
);
const message = exportRequestType.create(serviceRequest);
Expand Down

0 comments on commit 922f2f3

Please sign in to comment.