I'm having some issues with defining the PropTypes for a string enumerator. I have the following type in Typescript:
state: "pending"|"accepted"|"rejected",
and the corresponding propType:
state: PropTypes.oneOf(["pending","accepted","rejected"]).isRequired,
This, however throws the following error: "Type 'string' is not assignable to type '"pending" | "accepted" | "rejected"'.ts(2322)". I really don't know what to do! Thanks in advance for any help you can give me.