Some return types are transpiled to any, which causes an error when a generic method is called on it.
Error noticed on java js runtime:
public interface Collection<E> {
default Stream<E> stream() {
return new StreamHelper<E>(this);
}
}
transpiles to
export interface Collection<E> {
stream() : any;
}
collection.stream().collect<any, any>(java.util.stream.Collectors.toList<any>()) // error: Untyped function calls may not accept type arguments
Some return types are transpiled to any, which causes an error when a generic method is called on it.
Error noticed on java js runtime:
transpiles to