feat: Upgrade TypeScript to v5 (no-changelog) (#5755)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-03-30 13:59:59 +02:00
committed by GitHub
parent b69129bd78
commit 87e979c19a
21 changed files with 150 additions and 129 deletions

View File

@@ -64,7 +64,8 @@ export async function helpscoutApiRequestAllItems(
responseData = await helpscoutApiRequest.call(this, method, endpoint, body, query, uri);
uri = get(responseData, '_links.next.href');
returnData.push.apply(returnData, get(responseData, propertyName) as IDataObject[]);
if (query.limit && query.limit <= returnData.length) {
const limit = query.limit as number | undefined;
if (limit && limit <= returnData.length) {
return returnData;
}
} while (responseData._links?.next?.href !== undefined);