89dae098ed0464650906d1c984945803a0f9ce0b510d67a04a02e61283d9d9eb.json 4.8 KB

1
  1. {"ast":null,"code":"\"use strict\";\n\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Translations = void 0;\nconst Exports_js_1 = require(\"./Exports.js\");\n/**\n * Represents collection of parameters and their values.\n * @class Translations\n */\nclass Translations {\n constructor() {\n // Use an PropertyCollection internally, just wrapping it to hide the | enum syntax it has.\n this.privMap = new Exports_js_1.PropertyCollection();\n }\n /**\n * Get the languages in the object in a String array.\n * @member Translations.prototype.languages\n * @function\n * @public\n * @returns {string[]} languages in translations object.\n */\n get languages() {\n return this.privMap.keys;\n }\n /**\n * Returns the parameter value in type String. The parameter must have the same type as String.\n * Currently only String, int and bool are allowed.\n * If the name is not available, the specified defaultValue is returned.\n * @member Translations.prototype.get\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} def - The default value which is returned if the parameter is not available in the collection.\n * @returns {string} value of the parameter.\n */\n get(key, def) {\n return this.privMap.getProperty(key, def);\n }\n /**\n * Sets the String value of the parameter specified by name.\n * @member Translations.prototype.set\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} value - The value of the parameter.\n */\n set(key, value) {\n this.privMap.setProperty(key, value);\n }\n}\nexports.Translations = Translations;","map":{"version":3,"names":["Object","defineProperty","exports","value","Translations","Exports_js_1","require","constructor","privMap","PropertyCollection","languages","keys","get","key","def","getProperty","set","setProperty"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/microsoft-cognitiveservices-speech-sdk/distrib/lib/src/sdk/Translations.js"],"sourcesContent":["\"use strict\";\n// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Translations = void 0;\nconst Exports_js_1 = require(\"./Exports.js\");\n/**\n * Represents collection of parameters and their values.\n * @class Translations\n */\nclass Translations {\n constructor() {\n // Use an PropertyCollection internally, just wrapping it to hide the | enum syntax it has.\n this.privMap = new Exports_js_1.PropertyCollection();\n }\n /**\n * Get the languages in the object in a String array.\n * @member Translations.prototype.languages\n * @function\n * @public\n * @returns {string[]} languages in translations object.\n */\n get languages() {\n return this.privMap.keys;\n }\n /**\n * Returns the parameter value in type String. The parameter must have the same type as String.\n * Currently only String, int and bool are allowed.\n * If the name is not available, the specified defaultValue is returned.\n * @member Translations.prototype.get\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} def - The default value which is returned if the parameter is not available in the collection.\n * @returns {string} value of the parameter.\n */\n get(key, def) {\n return this.privMap.getProperty(key, def);\n }\n /**\n * Sets the String value of the parameter specified by name.\n * @member Translations.prototype.set\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} value - The value of the parameter.\n */\n set(key, value) {\n this.privMap.setProperty(key, value);\n }\n}\nexports.Translations = Translations;\n\n"],"mappings":"AAAA,YAAY;;AACZ;AACA;AACAA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7DD,OAAO,CAACE,YAAY,GAAG,KAAK,CAAC;AAC7B,MAAMC,YAAY,GAAGC,OAAO,CAAC,cAAc,CAAC;AAC5C;AACA;AACA;AACA;AACA,MAAMF,YAAY,CAAC;EACfG,WAAWA,CAAA,EAAG;IACV;IACA,IAAI,CAACC,OAAO,GAAG,IAAIH,YAAY,CAACI,kBAAkB,CAAC,CAAC;EACxD;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,IAAIC,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACF,OAAO,CAACG,IAAI;EAC5B;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACIC,GAAGA,CAACC,GAAG,EAAEC,GAAG,EAAE;IACV,OAAO,IAAI,CAACN,OAAO,CAACO,WAAW,CAACF,GAAG,EAAEC,GAAG,CAAC;EAC7C;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;EACIE,GAAGA,CAACH,GAAG,EAAEV,KAAK,EAAE;IACZ,IAAI,CAACK,OAAO,CAACS,WAAW,CAACJ,GAAG,EAAEV,KAAK,CAAC;EACxC;AACJ;AACAD,OAAO,CAACE,YAAY,GAAGA,YAAY","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}