Question:
Sorry if this question is too stupid ๐I have an
interface
:const
, like routes config
.function
, it will take one of those route as parameter
:APIRoutes
properties.I mean something like this:
Thanks
Answer:
You needkeyof
operator. It takes an object type and produces a union of its keys.If you have better answer, please add a comment about this, thank you!