UNPKG

@voice-ping/cognitive-services-speech

Version:

VoicePing Cognitive Services Speech SDK for JavaScript forked from Microsoft

1 lines 2.47 kB
{"version":3,"sources":["src/sdk/CancellationDetailsBase.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,qBAAqB,EACrB,kBAAkB,EACrB,MAAM,WAAW,CAAC;AAEnB;;;GAGG;AACH,qBAAa,uBAAuB;IAChC,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,aAAa,CAAwB;IAE7C;;;;;OAKG;IACH,SAAS,aAAa,MAAM,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB;IAMxG;;;;;;OAMG;IACH,IAAW,MAAM,IAAI,kBAAkB,CAEtC;IAED;;;;;;OAMG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;;;OAIG;IACH,IAAW,SAAS,IAAI,qBAAqB,CAE5C;CAEJ","file":"CancellationDetailsBase.d.ts","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT license.\n\nimport {\n CancellationErrorCode,\n CancellationReason,\n} from \"./Exports\";\n\n/**\n * Contains detailed information about why a result was canceled.\n * @class CancellationDetailsBase\n */\nexport class CancellationDetailsBase {\n private privReason: CancellationReason;\n private privErrorDetails: string;\n private privErrorCode: CancellationErrorCode;\n\n /**\n * Creates and initializes an instance of this class.\n * @constructor\n * @param {CancellationReason} reason - The cancellation reason.\n * @param {string} errorDetails - The error details, if provided.\n */\n protected constructor(reason: CancellationReason, errorDetails: string, errorCode: CancellationErrorCode) {\n this.privReason = reason;\n this.privErrorDetails = errorDetails;\n this.privErrorCode = errorCode;\n }\n\n /**\n * The reason the recognition was canceled.\n * @member CancellationDetailsBase.prototype.reason\n * @function\n * @public\n * @returns {CancellationReason} Specifies the reason canceled.\n */\n public get reason(): CancellationReason {\n return this.privReason;\n }\n\n /**\n * In case of an unsuccessful recognition, provides details of the occurred error.\n * @member CancellationDetailsBase.prototype.errorDetails\n * @function\n * @public\n * @returns {string} A String that represents the error details.\n */\n public get errorDetails(): string {\n return this.privErrorDetails;\n }\n\n /**\n * The error code in case of an unsuccessful recognition.\n * Added in version 1.1.0.\n * @return An error code that represents the error reason.\n */\n public get ErrorCode(): CancellationErrorCode {\n return this.privErrorCode;\n }\n\n}\n"]}