You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This is a misunderstanding of TypeScript ? modifier. What you are saying with such a type for fn is that fn may receive 0 arguments, 1 argument or 2 arguments depending on the case. What you want to represent isn't this – each() will every single time receive both elementFinder and index.
This kind of errors are now becoming evident thanks to TypeScript's new --strictFunctionTypes flag, causing a lot of compilation problems.
Many other functions (e.g. map()) contain the same mistake.