refactor(editor): Add typed event bus (no-changelog) (#10367)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Tomi Turtiainen
2024-08-13 15:11:28 +03:00
committed by GitHub
parent bfa7075950
commit b2e0f33959
6 changed files with 110 additions and 52 deletions

View File

@@ -0,0 +1,12 @@
import { createEventBus } from './event-bus';
export interface FormEventBusEvents {
submit: never;
}
export type FormEventBus = ReturnType<typeof createFormEventBus>;
/**
* Creates a new event bus to be used with the `FormInputs` component.
*/
export const createFormEventBus = createEventBus<FormEventBusEvents>;