UNPKG
reusify
Version:
latest (1.1.0)
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Reuse objects and functions with style
github.com/mcollina/reusify
mcollina/reusify
reusify
/
reusify.d.ts
15 lines
(11 loc)
•
212 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
interface
Node
{ next: Node |
null
; }
interface
Constructor
<
T
> {
new
(): T; }
declare function
reusify
<
T
extends
Node
>(
constructor: Constructor<T>
):
{
get
(): T; release(node: T):
void
; }; export = reusify;