fix: slow types

This commit is contained in:
2025-04-25 22:47:07 +00:00
parent 0fe213798b
commit 1b882cae1b

View File

@@ -99,7 +99,9 @@ export class Event<TEventState extends EventState = EventState> {
} }
} }
export const event = { export const event: {
type<const TType extends string>(type: TType): Event<{ type: TType }>;
} = {
type<const TType extends string>(type: TType): Event<{ type: TType }> { type<const TType extends string>(type: TType): Event<{ type: TType }> {
return new Event<{ type: TType }>({ type }); return new Event<{ type: TType }>({ type });
}, },