Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
22 lines (22 sloc) 994 Bytes
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { __rest } from "tslib";
/**
* Converts an OperationOptions to a RequestOptionsBase
*
* @param opts - OperationOptions object to convert to RequestOptionsBase
*/
export function operationOptionsToRequestOptionsBase(opts) {
const { requestOptions, tracingOptions } = opts, additionalOptions = __rest(opts, ["requestOptions", "tracingOptions"]);
let result = additionalOptions;
if (requestOptions) {
result = Object.assign(Object.assign({}, result), requestOptions);
}
if (tracingOptions) {
result.tracingContext = tracingOptions.tracingContext;
// By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
result.spanOptions = tracingOptions === null || tracingOptions === void 0 ? void 0 : tracingOptions.spanOptions;
}
return result;
}
//# sourceMappingURL=operationOptions.js.map