@Retention(value=RUNTIME)
@Target(value=TYPE)
@Documented
public @interface JsFunction
There are some limitations exists on JsFunction to make them practical and efficient:
JsType
(directly or
indirectly).
JsOverlay
and
cannot be overridden by the implementations.
As a best practice, we also recommend marking JsFunction interfaces with FunctionalInterface to get improved checking in IDEs.
Instanceof and Castability:
Instanceof and casting for JsFunction is effectively a JavaScript 'typeof' check to determine if the instance is a function.