Hi everyone!
In my project I have a type
QueryParam* = tuple[key: string, value: string]
Run
and functions that receives `openArray` of such objects as a parameter like
this:
query = {"tags": "some tag", "limit": "10"}
Run
Is there some way to make `value` part of my type not string but everything
that has string representation, e.g has `$` method, so i can pass parameters
like this `query = {"tags": "some tag", "limit": 10}` and convert everything
that I need to convert to string in my function?
I know that you can achieve something similar with `varargs`, for example
`echo` pocedure:
proc echo*(x: varargs[typed, `$`])
Run
but I can't figure out how to handle it in my case.
Thank you in advance!