Skip to content

Commit

Permalink
feat(core): updated element type to also accept typeof globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeCht committed Oct 24, 2024
1 parent f22f7e8 commit 43d4651
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface EventControllerOptions<T extends ZodSchema> {
* Supports adding, emitting, and removing the event listener, as well as middleware for event processing.
*/
export class EventController<T extends ZodSchema> {
private element: HTMLElement | Window
private element: HTMLElement | Window | typeof globalThis
private pipeline: Pipeline<EventPayload<T>>

private condition?: (payload: EventPayload<T>) => boolean
Expand Down

0 comments on commit 43d4651

Please sign in to comment.