in src/coreApi/converters/toCoreFunctionMetadata.ts [38:83]
dataType: toCoreBindingDataType(data.dataType),
direction: toCoreBindingDirection(data.direction),
};
return ensureKeysMatch(data, result);
} else {
return data;
}
}
function toCoreBindingDataType(
data: rpc.BindingInfo.DataType | null | undefined
): coreTypes.RpcBindingDataType | null | undefined {
switch (data) {
case rpc.BindingInfo.DataType.binary:
return 'binary';
case rpc.BindingInfo.DataType.stream:
return 'stream';
case rpc.BindingInfo.DataType.string:
return 'string';
case rpc.BindingInfo.DataType.undefined:
return 'undefined';
default:
return handleDefaultEnumCase(data, 'RpcBindingDataType');
}
}
function toCoreBindingDirection(
data: rpc.BindingInfo.Direction | null | undefined
): coreTypes.RpcBindingDirection | null | undefined {
switch (data) {
case rpc.BindingInfo.Direction.in:
return 'in';
case rpc.BindingInfo.Direction.inout:
return 'inout';
case rpc.BindingInfo.Direction.out:
return 'out';
default:
return handleDefaultEnumCase(data, 'RpcBindingDirection');
}
}
function toCoreRetryOptions(
data: rpc.IRpcRetryOptions | null | undefined
): coreTypes.RpcRetryOptions | null | undefined {
if (data) {
const result = {