E4008#
FFI function cannot have type parameters.
Erroneous Example#
pub extern "js" fn id[T](x : T) -> T = "(x) => x"
The example declares an FFI function (marked extern) with a type parameter,
which is not allowed.
Suggestion#
Consider using a concrete type that suits your needs:
For more complicated scenarios, consider adding an extra trait: