UNPKG

@azure/ai-text-analytics

Version:
26 lines 988 B
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { delay } from "../../util"; import { AnalysisPoller } from "../poller"; import { BeginAnalyzeHealthcarePollerOperation } from "./operation"; /** * Class that represents a poller that waits for the healthcare results. * @internal */ export class BeginAnalyzeHealthcarePoller extends AnalysisPoller { // eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters constructor(inputs) { const { client, documents, options, updateIntervalInMs = 5000, resumeFrom } = inputs; let state; if (resumeFrom) { state = JSON.parse(resumeFrom).state; } const operation = new BeginAnalyzeHealthcarePollerOperation((state || {}), client, documents, options); super(operation); this.updateIntervalInMs = updateIntervalInMs; } delay() { return delay(this.updateIntervalInMs); } } //# sourceMappingURL=poller.js.map