Skip to content

Commit 8a31a3b

Browse files
committed
chore: fix get-container util ts def
1 parent e442f97 commit 8a31a3b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/utils/get-container.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
export type GetContainer = () => HTMLElement
2+
13
export function resolveContainer(
2-
getContainer: HTMLElement | (() => HTMLElement) | undefined | null
4+
getContainer: HTMLElement | GetContainer | undefined | null
35
) {
46
const container =
5-
typeof getContainer === 'function' ? getContainer() : getContainer
7+
typeof getContainer === 'function'
8+
? (getContainer as GetContainer)()
9+
: getContainer
610
return container || document.body
711
}

0 commit comments

Comments
 (0)