Permalink
Cannot retrieve contributors at this time
22 lines (22 sloc)
994 Bytes
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?
codeql-action/node_modules/@azure/core-http/dist-esm/src/operationOptions.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |