@@ -556,32 +556,32 @@ string GetDelegateReturnTypeHash(Type type)
556556 check : ( method , target , arguments ) => EnsureIsComparableInJavascript ( method , ReflectionUtils . GetEnumerableType ( arguments . First ( ) . Type ) . NotNull ( ) ) ) ) ;
557557
558558 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . ElementAt ( 0 ) ,
559- new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) ) ) ;
559+ new GenericMethodCompiler ( ( args , method ) => BuildIndexer ( args [ 1 ] , args [ 2 ] , method ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ) ;
560560 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . ElementAtOrDefault ( 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 ( ( ) => ImmutableArrayExtensions . ElementAt ( default ( ImmutableArray < Generic . T > ) , 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 . ElementAtOrDefault ( 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
567- var firstOrDefault = new GenericMethodCompiler ( ( args , m ) => BuildIndexer ( args [ 1 ] , new JsLiteral ( 0 ) , m ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
567+ var firstOrDefault = new GenericMethodCompiler ( ( args , m ) => BuildIndexer ( args [ 1 ] , new JsLiteral ( 0 ) , m ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
568568 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . FirstOrDefault ( ) , firstOrDefault ) ;
569569 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . First ( ) , firstOrDefault ) ;
570570 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . FirstOrDefault ( default ( ImmutableArray < Generic . T > ) ) , firstOrDefault ) ;
571571 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . First ( default ( ImmutableArray < Generic . T > ) ) , firstOrDefault ) ;
572572
573573 var firstOrDefaultPred = new GenericMethodCompiler ( args =>
574- args [ 1 ] . Member ( "find" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
574+ args [ 1 ] . Member ( "find" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
575575 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . FirstOrDefault ( _ => true ) , firstOrDefaultPred ) ;
576576 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . First ( _ => true ) , firstOrDefaultPred ) ;
577577 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . FirstOrDefault ( default ( ImmutableArray < Generic . T > ) , _ => true ) , firstOrDefaultPred ) ;
578578 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . First ( default ( ImmutableArray < Generic . T > ) , _ => true ) , firstOrDefaultPred ) ;
579579
580- var lastOrDefault = new GenericMethodCompiler ( args => args [ 1 ] . Member ( "at" ) . Invoke ( new JsLiteral ( - 1 ) ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
580+ var lastOrDefault = new GenericMethodCompiler ( args => args [ 1 ] . Member ( "at" ) . Invoke ( new JsLiteral ( - 1 ) ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
581581 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . LastOrDefault ( ) , lastOrDefault ) ;
582582 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . LastOrDefault ( default ( ImmutableArray < Generic . T > ) ) , lastOrDefault ) ;
583583 var lastOrDefaultPred = new GenericMethodCompiler ( args =>
584- args [ 1 ] . Member ( "findLast" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) ) ;
584+ args [ 1 ] . Member ( "findLast" ) . Invoke ( args [ 2 ] ) . WithAnnotation ( MayBeNullAnnotation . Instance ) . WithAnnotation ( ResultMayBeObservableAnnotation . Instance ) ) ;
585585 AddMethodTranslator ( ( ) => Enumerable . Empty < Generic . T > ( ) . LastOrDefault ( _ => false ) , lastOrDefaultPred ) ;
586586 AddMethodTranslator ( ( ) => ImmutableArrayExtensions . LastOrDefault ( default ( ImmutableArray < Generic . T > ) , _ => false ) , lastOrDefaultPred ) ;
587587
0 commit comments