I'm splitting this out from #289. This issue will be about improving how the unsupported generic types and methods are handled by the build. #289 will be about adding (partial) support for exporting generic types and methods to JS from a .NET module.
The following are examples of unsupported generic exports:
[JSExport]
public class GenericClass<T> { ... }
public static class ClassWithGenericMethod
{
[JSExport]
public static void GenericMethod<T>();
}
As requested, it may be better to report a warning rather than an error, so that the rest of the build is not blocked. And if generic types are referenced as parameters in other non-generic APIs, they would be marshalled as external/unknown so at least the values could be round-tripped through JS back to .NET.
I'm splitting this out from #289. This issue will be about improving how the unsupported generic types and methods are handled by the build. #289 will be about adding (partial) support for exporting generic types and methods to JS from a .NET module.
The following are examples of unsupported generic exports:
As requested, it may be better to report a warning rather than an error, so that the rest of the build is not blocked. And if generic types are referenced as parameters in other non-generic APIs, they would be marshalled as
external
/unknown
so at least the values could be round-tripped through JS back to .NET.