@azure/search-documents
Version:
Azure client library to use AI Search for node.js and browser.
13 lines • 448 B
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
/**
* Creates an interval that calls the callback every `ms` milliseconds.
* @param fn - The callback to invoke
* @param ms - The interval in milliseconds
* @returns A cleanup function to clear the interval
*/
export function createInterval(fn, ms) {
const id = setInterval(fn, ms);
return () => clearInterval(id);
}
//# sourceMappingURL=timers-browser.mjs.map