Hacker News new | ask | show | jobs
by mx_02 1003 days ago
I'd love if interfaces worked as in typescript.

As long as the object signature matches the interface as parameter then you can use it.

1 comments

Check out project manifold, it’s a compiler plugin for Java. Among other amazing features it adds structural typing [1], which is essentially interfaces typescript interfaces.

1. https://github.com/manifold-systems/manifold/tree/master/man...