File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
typescript/packages/common-builder/src Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,27 @@ let fetchDataFactory:
3939 >
4040 | undefined = undefined ;
4141
42+ export function streamData < T > (
43+ params : Value < {
44+ url : string ;
45+ options ?: RequestInit ;
46+ result ?: T ;
47+ } >
48+ ) : Value < { pending : boolean ; result : T ; error : any } > {
49+ streamDataFactory ||= createNodeFactory ( {
50+ type : "builtin" ,
51+ implementation : "streamData" ,
52+ } ) ;
53+ return streamDataFactory ( params ) ;
54+ }
55+
56+ let streamDataFactory :
57+ | NodeFactory <
58+ { url : string ; options ?: RequestInit ; result ?: any } ,
59+ { pending : boolean ; result : any ; error : any }
60+ >
61+ | undefined = undefined ;
62+
4263export function ifElse < T , U , V > (
4364 condition : Value < T > ,
4465 ifTrue : Value < U > ,
You can’t perform that action at this time.
0 commit comments