The Moralis types donāt match the examples and the documentation, for example with react-moralis there should be the authenticate function from the āuseMoralisā hook, and based on the documentation it could be used like:
"authenticate({ provider: 'metamask' })"
Only if I do it, I get compilation errors - but if I ignore the types, it works fine! indicating the the types donāt match the actual code!
Provider cannot be passed to moralis based on the types, the types for the options object passed to it are:
export interface AuthenticateOptions { onError?: (error: Error) => void; onSuccess?: (user: MoralisType.User) => void; onComplete?: () => void; throwOnError?: boolean; type?: AuthType; connector?: MoralisType.Connector; chainId?: number; signingMessage?: string; }
And that makes working with moralis and typescript, a very bad experience!