I am getting Parameter 'event' implicitly has an 'any' type.ts(7006) from the code below -
const handleFormSubmit = (event) => {
event.preventDefault();
const email = event.target.elements.email?.value;
const password = event.target.elements.password?.value;
console.log(email, password);
};
Searched around but didn't found any answer which can solve it, any help is appreciated. Thank you :)
any. You must declare the type, such asevent: Event. In a TypeScript environment -- by default -- you must strongly declare function arguments typings.implicit any. This is useful when you are migrating legacy code into your application.