@@ -905,7 +905,7 @@ function makeResultFn<Arg, E, A>(
905905export type PullResult < A , E = never > = Result . Result < {
906906 readonly done : boolean
907907 readonly items : ReadonlyArray < A >
908- } , E | NoSuchElementException >
908+ } , E >
909909
910910/**
911911 * @since 1.0.0
@@ -931,7 +931,7 @@ const makeStreamPullEffect: <A, E>(
931931 create : Stream . Stream < A , E , RxRegistry > | ( ( get : Context ) => Stream . Stream < A , E , RxRegistry > ) ,
932932 options ?: { readonly disableAccumulation ?: boolean } | undefined
933933) => Effect . Effect <
934- Effect . Effect < { readonly done : boolean ; readonly items : Array < A > } , NoSuchElementException | E > ,
934+ Effect . Effect < { readonly done : boolean ; readonly items : Array < A > } , E > ,
935935 never ,
936936 Scope . Scope | RxRegistry
937937> = Effect . fnUntraced ( function * < A , E > (
@@ -965,16 +965,11 @@ const makeStreamPullEffect: <A, E>(
965965 items : Chunk . toReadonlyArray ( items )
966966 } )
967967 } ,
968- onFailure (
969- cause
970- ) : Effect . Effect < { readonly done : boolean ; readonly items : ReadonlyArray < A > } , NoSuchElementException | E > {
968+ onFailure ( cause ) {
971969 const failure = Cause . failureOption ( cause )
972970 if ( failure . _tag === "None" ) {
973971 return Effect . failCause ( cause as Cause . Cause < never > )
974972 } else if ( failure . value . _tag === "None" ) {
975- if ( acc . length === 0 ) {
976- return Effect . fail ( new NoSuchElementException ( ) )
977- }
978973 return Effect . succeed ( {
979974 done : true ,
980975 items : Chunk . toReadonlyArray ( acc )
@@ -988,19 +983,15 @@ const makeStreamPullEffect: <A, E>(
988983} )
989984
990985const makeStreamPull = < A , E > (
991- pullRx : Rx <
992- Result . Result <
993- Effect . Effect < { readonly done : boolean ; readonly items : Array < A > } , NoSuchElementException | E >
994- >
995- > ,
986+ pullRx : Rx < Result . Result < Effect . Effect < { readonly done : boolean ; readonly items : Array < A > } , E > > > ,
996987 options ?: {
997988 readonly initialValue ?: ReadonlyArray < A >
998989 }
999990) => {
1000991 const initialValue : Result . Result < {
1001992 readonly done : boolean
1002993 readonly items : Array < A >
1003- } , E | NoSuchElementException > = options ?. initialValue !== undefined
994+ } , E > = options ?. initialValue !== undefined
1004995 ? Result . success ( { done : false , items : options . initialValue as Array < A > } )
1005996 : Result . initial ( )
1006997
0 commit comments