@@ -558,32 +558,32 @@ string GetDelegateReturnTypeHash(Type type)
558558 check : ( method , target , arguments ) => EnsureIsComparableInJavascript ( method , ReflectionUtils . GetEnumerableType ( arguments . First ( ) . Type ) . NotNull ( ) ) ) ) ;
559559
560560 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . ElementAt ( 0 ) ,
561- new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) ) ) ;
561+ new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ) ;
562562 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . ElementAtOrDefault ( 0 ) ,
563- new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) ) ) ;
563+ new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ) ;
564564 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . ElementAt ( default ( ImmutableArray < Generic . T > ) , 0 ) ,
565- new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) ) ) ;
565+ new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ) ;
566566 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . ElementAtOrDefault ( default ( ImmutableArray < Generic . T > ) , 0 ) ,
567- new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) ) ) ;
567+ new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ) ;
568568
569- var firstOrDefault = new GenericMethodCompiler ( ( args , m ) => BuildIndexer ( args [ 1 ] , new JsLiteral ( 0 ) , m ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
569+ var firstOrDefault = new GenericMethodCompiler ( ( args , m ) => BuildIndexer ( args [ 1 ] , new JsLiteral ( 0 ) , m ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
570570 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . FirstOrDefault ( ) , firstOrDefault ) ;
571571 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . First ( ) , firstOrDefault ) ;
572572 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . FirstOrDefault ( default ( ImmutableArray < Generic . T > ) ) , firstOrDefault ) ;
573573 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . First ( default ( ImmutableArray < Generic . T > ) ) , firstOrDefault ) ;
574574
575575 var firstOrDefaultPred = new GenericMethodCompiler ( args =>
576- args [ 1 ] . Member ( "find" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
576+ args [ 1 ] . Member ( "find" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
577577 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . FirstOrDefault ( _ => true ) , firstOrDefaultPred ) ;
578578 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . First ( _ => true ) , firstOrDefaultPred ) ;
579579 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . FirstOrDefault ( default ( ImmutableArray < Generic . T > ) , _ => true ) , firstOrDefaultPred ) ;
580580 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . First ( default ( ImmutableArray < Generic . T > ) , _ => true ) , firstOrDefaultPred ) ;
581581
582- var lastOrDefault = new GenericMethodCompiler ( args => args [ 1 ] . Member ( "at" ) . Invoke ( new JsLiteral ( - 1 ) ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
582+ var lastOrDefault = new GenericMethodCompiler ( args => args [ 1 ] . Member ( "at" ) . Invoke ( new JsLiteral ( - 1 ) ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
583583 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . LastOrDefault ( ) , lastOrDefault ) ;
584584 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . LastOrDefault ( default ( ImmutableArray < Generic . T > ) ) , lastOrDefault ) ;
585585 var lastOrDefaultPred = new GenericMethodCompiler ( args =>
586- args [ 1 ] . Member ( "findLast" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
586+ args [ 1 ] . Member ( "findLast" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
587587 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . LastOrDefault ( _ => false ) , lastOrDefaultPred ) ;
588588 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . LastOrDefault ( default ( ImmutableArray < Generic . T > ) , _ => false ) , lastOrDefaultPred ) ;
589589
0 commit comments