UNPKG
@efflore/ui-element
Version:
latest (0.8.5)
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.3
0.7.2
0.7.1
0.7.0
0.6.2
0.6.1
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
UIElement - minimal reactive framework based on Web Components
@efflore/ui-element
/
types
/
lib
/
task.d.ts
8 lines
(7 loc)
•
232 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
type
UITask
<A> = { ():
Promise
<A>;
map
: <B>
(
f
: (a: A) => B
) =>
UITask
<B>;
chain
: <B>
(
f
: (a: A) =>
UITask
<B>
) =>
UITask
<B>; };
declare
const
task
: <A>
(
effect
: () =>
Promise
<A>
) =>
UITask
<A>;
export
{
type
UITask
, task };