Skip to content

Commit dddc8de

Browse files
authored
fix invalid TypeScript syntax
1 parent 2e06c60 commit dddc8de

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ declare module 'focus-trap' {
55
* returns a DOM node.
66
*/
77
export type FocusTarget = HTMLElement | string | { (): HTMLElement };
8+
9+
type MouseEventToBoolean = (event: MouseEvent) => boolean
810

911
export interface Options {
1012
/**
@@ -58,7 +60,7 @@ declare module 'focus-trap' {
5860
* a click outside the focus trap will not be prevented,
5961
* even when `clickOutsideDeactivates` is `false`.
6062
*/
61-
allowOutsideClick?: boolean | (event: MouseEvent) => boolean;
63+
allowOutsideClick?: boolean | MouseEventToBoolean;
6264
/**
6365
* By default, focus() will scroll to the element if not in viewport.
6466
* It can produce unintended effects like scrolling back to the top of a modal.

0 commit comments

Comments
 (0)