@euirim/microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
1 lines • 1.83 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;;;;;;;;;;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.\n// Licensed under the MIT license.\n\nimport { PropertyCollection } from \"./Exports\";\n\n/**\n * Represents collection of parameters and their values.\n * @class Translation\n */\nexport class Translations {\n // Use an PropertyCollection internally, just wrapping it to hide the | enum syntax it has.\n private privMap: PropertyCollection = new PropertyCollection();\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 Translation.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 public get(key: string, def?: string): string {\n return this.privMap.getProperty(key, def);\n }\n\n /**\n * Sets the String value of the parameter specified by name.\n * @member Translation.prototype.set\n * @function\n * @public\n * @param {string} key - The parameter name.\n * @param {string} value - The value of the parameter.\n */\n public set(key: string, value: string): void {\n this.privMap.setProperty(key, value);\n }\n}\n"]}