TypeScript is JavaScript with syntax for types. TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.
How to reproduce it
export function EventOptions(setEventType: React.Dispatch<React.SetStateAction<string>>, eventOptions: React.RefObject<HTMLDivElement>): ReactElement {
...
return <></>;
}
<EventOptions setEventType={setEventType} eventOptions={eventOptions}></EventOptions>
Error
BugFinder: Type '{ setEventType: string; eventOptions: MutableRefObject<HTMLDivElement>; }' is not assignable to type 'IntrinsicAttributes & Dispatch<SetStateAction<string>>'.BugFinder:
Property 'setEventType' does not exist on type 'IntrinsicAttributes & Dispatch<SetStateAction<string>>'.
Solution
Update definition of parameters.
export function EventOptions({ setEventType, eventOptions }: { setEventType: React.Dispatch>; eventOptions: React.RefObject }): ReactElement {
…
return <></>;
}