Optional < JSType > expectAutoboxesToIterableOrAsyncIterable ( Node n , JSType type , String msg ) { MaybeBoxedIterableOrAsyncIterable maybeBoxed = JsIterables . maybeBoxIterableOrAsyncIterable ( type , typeRegistry ) ; if ( maybeBoxed . isMatch ( ) ) { return Optional . of ( maybeBoxed . getTemplatedType ( ) ) ; } mismatch ( n , msg , type , iterableOrAsyncIterable ) ; return Optional . empty ( ) ; }
Expect the type to autobox to be an Iterable or AsyncIterable .