From 785938b78a5e7f9095d3f65e06f6f6ec5122d8fd Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 26 Nov 2024 10:37:01 +0000 Subject: [PATCH] Improve typing of API client callback functions --- packages/frontend-core/src/api/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend-core/src/api/types.ts b/packages/frontend-core/src/api/types.ts index ec6b604340..f083d14dd7 100644 --- a/packages/frontend-core/src/api/types.ts +++ b/packages/frontend-core/src/api/types.ts @@ -10,9 +10,9 @@ export enum HTTPMethod { export type APIClientConfig = { enableCaching?: boolean - attachHeaders?: Function - onError?: Function - onMigrationDetected?: Function + attachHeaders?: (headers: Record) => void + onError?: (error: any) => void + onMigrationDetected?: (migration: string) => void } export type APICallConfig = {