Question:
Just a new developer entering the typescript world. This may kinda seem not that all hard but I can’t seem to find any solutions about this issue from google nor stack overflow itsself.How do I convert/cast typescript type from
Answer:
Here’s how you do that. You take all the keys of the first type and create aRecord
type with a new value type ({public: true, private: true}
).If you have better answer, please add a comment about this, thank you!