Export type RegisterFunctions (#21441)

This commit is contained in:
Brainslug
2024-02-15 12:26:27 +01:00
committed by GitHub
parent baffa1af2d
commit 45f203afb4
2 changed files with 7 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
---
"@directus/extensions": patch
---
Added export for RegisterFunctions type

View File

@@ -5,7 +5,7 @@ export type HookExtensionContext = ApiExtensionContext & {
emitter: any;
};
type RegisterFunctions = {
export type RegisterFunctions = {
filter: <T = unknown>(event: string, handler: FilterHandler<T>) => void;
action: (event: string, handler: ActionHandler) => void;
init: (event: string, handler: InitHandler) => void;
@@ -13,6 +13,4 @@ type RegisterFunctions = {
embed: (position: 'head' | 'body', code: string | EmbedHandler) => void;
};
type HookConfigFunction = (register: RegisterFunctions, context: HookExtensionContext) => void;
export type HookConfig = HookConfigFunction;
export type HookConfig = (register: RegisterFunctions, context: HookExtensionContext) => void;