Closed dmitry-a-morozov closed 6 years ago
@dmitry-a-morozov Good point. Yes, right now you need a bogus value.
@dmitry-a-morozov We should also add test cases to statically parameterized methods to the TPSDK itself
@dsyme I'll try to find time to add the test cases
@dmitry-a-morozov I'll leave this open as we should make the parameter optional I suppose
I’ve made some progress making it optional and could submit a PR, if that is helpful.
I'm guessing your use case was for an erasing TP, as my attempt to do this for a generative TP resulted in a NRE.
Description
A new ProvidedTypes api is great but I wonder what is supposed to be passed as value for
invokeCode
https://github.com/fsprojects/FSharp.TypeProviders.SDK/blob/33fd1c0a95dd1ddfe77f12e4921b6983f72c8e62/src/ProvidedTypes.fsi#L96 parameter for statically parametrized TP methods.Known workarounds
For now I used bogus value
Unchecked.defaultof<_>