UNPKG
context-state
Version:
latest (4.0.1)
4.0.1
4.0.0
3.2.0
3.1.3
3.1.2
3.1.1
3.1.0
3.0.0
2.4.0
2.3.1
2.3.0
2.2.2
2.2.1
2.2.0
2.1.0
2.0.0
1.0.0
Like unstated-next, but Pro
github.com/hemengke1997/context-state
hemengke1997/context-state
context-state
/
dist
/
esm
/
publisher.d.mts
11 lines
(9 loc)
•
254 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
type
Subscriber
<T> =
(
data
: T
) =>
void
;
declare
class
Publisher
<T =
unknown
, P =
unknown
> {
hook
:
(
props
: P
) =>
T;
constructor
(
hook
: (props: P) => T
);
subscribers
:
Set
<
Subscriber
<T>>;
data
: T;
notify
():
void
; }
export
{
Publisher
};