UNPKG
haunted
Version:
beta (4.6.0-beta.0)
latest (6.1.0)
next (6.0.0-next.2)
6.1.0
6.0.0
6.0.0-next.2
6.0.0-next.1
6.0.0-next.0
5.0.0
4.8.3
4.8.2
4.8.1
4.8.0
4.7.1
4.7.0
4.6.3
4.6.2
4.6.1
4.6.0
4.6.0-beta.0
4.5.4
4.5.3
4.5.2
4.5.1
4.5.0
4.4.0
4.3.0
4.2.1
4.2.0
4.1.4
4.1.3
4.1.2
4.1.0
4.0.0
4.0.0-beta.0
3.2.1
3.2.0
3.1.0
3.0.0
2.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
Hooks for web components
github.com/matthewp/haunted
matthewp/haunted
haunted
/
lib
/
use-ref.d.ts
12 lines
(11 loc)
•
259 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
interface
Ref
<T> {
current
: T; }
/** *
@function
*
@template
T
*
@param
{
T
}
initialValue
*
@return
{
{ current: T
}} Ref */
export
declare
function
useRef<T>():
Ref
<T |
undefined
>;
export
declare
function
useRef<T>(
initialValue
: T):
Ref
<T>;