@azure/ai-text-analytics
Version:
An isomorphic client library for the Azure Text Analytics service.
26 lines • 988 B
JavaScript
// 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