microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
1 lines • 2.29 kB
Source Map (JSON)
{"version":3,"sources":["src/sdk/Translations.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,qBAAa,YAAY;IAErB,OAAO,CAAC,OAAO,CAAgD;IAE/D;;;;;;OAMG;IACH,IAAW,SAAS,IAAI,MAAM,EAAE,CAE/B;IAED;;;;;;;;;;OAUG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM;IAI7C;;;;;;;OAOG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAG/C","file":"Translations.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT license.\r\n\r\nimport { PropertyCollection } from \"./Exports.js\";\r\n\r\n/**\r\n * Represents collection of parameters and their values.\r\n * @class Translations\r\n */\r\nexport class Translations {\r\n // Use an PropertyCollection internally, just wrapping it to hide the | enum syntax it has.\r\n private privMap: PropertyCollection = new PropertyCollection();\r\n\r\n /**\r\n * Get the languages in the object in a String array.\r\n * @member Translations.prototype.languages\r\n * @function\r\n * @public\r\n * @returns {string[]} languages in translations object.\r\n */\r\n public get languages(): string[] {\r\n return this.privMap.keys;\r\n }\r\n\r\n /**\r\n * Returns the parameter value in type String. The parameter must have the same type as String.\r\n * Currently only String, int and bool are allowed.\r\n * If the name is not available, the specified defaultValue is returned.\r\n * @member Translations.prototype.get\r\n * @function\r\n * @public\r\n * @param {string} key - The parameter name.\r\n * @param {string} def - The default value which is returned if the parameter is not available in the collection.\r\n * @returns {string} value of the parameter.\r\n */\r\n public get(key: string, def?: string): string {\r\n return this.privMap.getProperty(key, def);\r\n }\r\n\r\n /**\r\n * Sets the String value of the parameter specified by name.\r\n * @member Translations.prototype.set\r\n * @function\r\n * @public\r\n * @param {string} key - The parameter name.\r\n * @param {string} value - The value of the parameter.\r\n */\r\n public set(key: string, value: string): void {\r\n this.privMap.setProperty(key, value);\r\n }\r\n}\r\n"]}