We should fix this in Fable, but to workaround this issue it is possible to help the compiler infer the correct generics name. In order, to catch all occurence of this issues and make sure Thoth.Json.Core and Thoth.Json.JavaScript can be used on TypeScript, we should also run the tests against TypeScript.
See how the
invalidGenerics
is using$a
instead ofJsonValue
.This problem was first reported on Fable repository https://github.com/fable-compiler/Fable/issues/3586 and in private to me.
We should fix this in Fable, but to workaround this issue it is possible to help the compiler infer the correct generics name. In order, to catch all occurence of this issues and make sure Thoth.Json.Core and Thoth.Json.JavaScript can be used on TypeScript, we should also run the tests against TypeScript.