Marks a type containing a Single Abstract Method (SAM) as eligible for automatic conversion into
a Javascript function.
This enables lambda expressions to be passed directly to Javascript as callbacks.
However there are some additional limitations that are imposed to make this practical and
efficient:
A class may not implement more than one @JsFunction type. This restriction allows the
compiler to construct a one-to-one mapping to the Javascript function generated and the SAM to be
invoked in Java and to preserve referential equality.
A JsFunction interface cannot extend any other interfaces.
A JsFunction interface cannot have defender methods.
A class that implements a @JsFunction type (directly or indirectly) cannot be a @JsType.
As a best practice, we recommend marking @JsFunction interfaces also with @FunctionalInterface to
get improved checking in IDEs.