So, I have something like this:
const [value, setValue] = useState<SomeType>({} as SomeType);
The problem is I have to use "as SomeType" when I initialize AND when I reset that "value" to an empty object.
How would I just create a single type that would mean "SomeType" or empty object.. I did the following, but it didn't work
type SomeType =
| ProductSkus & {color: string}
| Record<string, never>;
I also tried:
type SomeType =
| ProductSkus & {color: string}
| object;
neither worked.