1 |
|
2 |
|
3 | import { __extends } from "tslib";
|
4 | import { ApiKeyCredentials } from "@azure/ms-rest-js";
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | var CognitiveServicesCredentials = (function (_super) {
|
12 | __extends(CognitiveServicesCredentials, _super);
|
13 | function CognitiveServicesCredentials(subscriptionKey) {
|
14 | var _this = this;
|
15 | if (!subscriptionKey || (subscriptionKey && typeof subscriptionKey.valueOf() !== "string")) {
|
16 | throw new Error("subscriptionKey cannot be null or undefined and must be of type string.");
|
17 | }
|
18 | var options = {
|
19 | inHeader: {
|
20 | "Ocp-Apim-Subscription-Key": subscriptionKey,
|
21 | "X-BingApis-SDK-Client": "node-SDK"
|
22 | }
|
23 | };
|
24 | _this = _super.call(this, options) || this;
|
25 | return _this;
|
26 | }
|
27 | return CognitiveServicesCredentials;
|
28 | }(ApiKeyCredentials));
|
29 | export { CognitiveServicesCredentials };
|
30 |
|
\ | No newline at end of file |