Reputation: 4471
I have defined types as below
interface LoginFormValues {
email?: string;
password?: string;
}
but eslint gives an error like this
Upvotes: 0
Views: 806
Reputation: 16586
It looks like email
cannot be undefined
, which seems reasonable. It is also likely password
can't be undefined
either. Your type definition should probably be:
interface LoginFormValues {
email: string;
password: string;
}
Upvotes: 1