I have the following code set up for a Zod contract, and I'm getting this error message when trying to use Key and ReactElement. I'm not clear on what the solution is in this instance, and other examples of this error message aren't related to a Zod-based error so I'm not sure if they apply. The error I'm getting, I'm getting on both Key and ReactElement.
'Key' only refers to a type, but is being used as a value here
import { z } from "zod";
import { Key, ReactElement } from "react";
export const Foo= z.object({
key: Key.optional(),
children: ReactElement.array(),
catId: z.string().optional(),
identifier: z.string().optional(),
})
export type FooProps= z.infer<typeof Foo>