UNPKG
common-hook
Version:
latest (1.3.2)
1.3.2
1.2.0
1.1.0
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.0.3
0.0.2
0.0.1
提供项目中常用的 React Hooks
github.com/JainaXiong/common-hook
JainaXiong/common-hook
common-hook
/
es
/
_utils
/
domTarget.d.ts
5 lines
(4 loc)
•
229 B
TypeScript
View Raw
1
2
3
4
5
type
TargetValue
<T> = T |
undefined
|
null
;
type
TargetType
=
HTMLElement
|
Element
|
Window
|
Document
;
export
declare
function
getTargetElement<T
extends
TargetType
>(
target
:
any
,
defaultElement
?: T):
TargetValue
<T>;
export
{};