UNPKG

@azure/ai-text-analytics

Version:
41 lines 1.03 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { Poller } from "@azure/core-lro"; import { delay } from "../util"; /** * Common properties and methods of analysis Pollers. * @internal */ export class AnalysisPoller extends Poller { constructor() { super(...arguments); /** * Defines how much time the poller is going to wait before making a new request to the service. */ this.updateIntervalInMs = 2000; } /** * The method used by the poller to wait before attempting to update its operation. */ async delay() { return delay(this.updateIntervalInMs); } } /** * Common properties and methods of polling operations. * @internal */ export class AnalysisPollOperation { constructor(state) { this.state = state; } /** * Serializes the Poller operation. */ toString() { return JSON.stringify({ state: this.state }); } } //# sourceMappingURL=poller.js.map