There are a few options, and strategies. We’ve listed from easiest to most thorough.
- Use any, then ask for help.
- Use unknown
- Use a Record with a string key and whatever value, like
Record<string, any>. - Use
IDontKnowYetas an aliased type or interface. - For a multitude of types, use an anonymous Union, like
string | number. If you still don’t know, usestring | number | anysince we’ll knowanyis the outlier. - Use a Pick or Partial of an existing type you may already have nearby.