@@ -498,22 +498,20 @@ export abstract class ApolloCache {
498498
499499 let currentResult : ApolloCache . WatchFragmentResult < TData > ;
500500 function toResult (
501- results : Array < ApolloCache . WatchFragmentResult < Unmasked < TData > | null > >
501+ results : Array < ApolloCache . WatchFragmentResult < TData > >
502502 ) : ApolloCache . WatchFragmentResult < any > {
503503 let result = results . reduce (
504- ( finalResult , res , idx ) => {
505- const result = res as ApolloCache . WatchFragmentResult < TData > ;
506-
507- finalResult . data . push ( result . data ) ;
508- finalResult . complete &&= result . complete ;
509- finalResult . dataState = finalResult . complete ? "complete" : "partial" ;
504+ ( memo , result , idx ) => {
505+ memo . data . push ( result . data ) ;
506+ memo . complete &&= result . complete ;
507+ memo . dataState = memo . complete ? "complete" : "partial" ;
510508
511509 if ( result . missing ) {
512- finalResult . missing ||= { } ;
513- ( finalResult . missing as any ) [ idx ] = result . missing ;
510+ memo . missing ||= { } ;
511+ ( memo . missing as any ) [ idx ] = result . missing ;
514512 }
515513
516- return finalResult ;
514+ return memo ;
517515 } ,
518516 {
519517 data : [ ] ,
@@ -534,7 +532,7 @@ export abstract class ApolloCache {
534532 let subscribed = false ;
535533 const observables = ids . map ( ( id ) =>
536534 this . watchSingleFragment ( id , query , options )
537- ) ;
535+ ) as Array < ApolloCache . ObservableFragment < TData > > ;
538536
539537 const observable =
540538 ids . length === 0 ?
0 commit comments