Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[breaking/do not merge] es(1403): improve middleware extension hooks configuration types #7372

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: pass generic config type down to hooks
  • Loading branch information
lsliwaradioluz committed Jan 16, 2025
commit 5d624124cb1983adb511e633ac0629c977bdf602
4 changes: 2 additions & 2 deletions packages/middleware/src/types/common.ts
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ export interface ApiClientExtension<API = any, CONTEXT = any, CONFIG = any> {
req: AlokaiRequest,
res: AlokaiResponse,
hooksContext: AlokaiContainer
) => ApiClientExtensionHooks;
) => ApiClientExtensionHooks<CONFIG>;
}

export type ErrorHandler = (
@@ -129,7 +129,7 @@ export interface Integration<
extensions: ApiClientExtension<API, CONTEXT>[]
// TODO(IN-4338): There is a bug in the types here
// we're not able to verify if the methods are namespaced or not with this implementation.
) => ApiClientExtension<API, CONTEXT>[];
) => ApiClientExtension<API, CONTEXT, CONFIG>[];
customQueries?: Record<string, CustomQueryFunction>;
initConfig?: TObject;
/**