Incorrect spelling in the file `index.d.ts` in the import of `./generated/web3Api.d.ts`

Hello,
I’ve installed latest version today and it seems there is in the file index.d.ts incorrect spelling in this import:
import { GeneratedWeb3API } from './generated/web3api';

The problem it’s not web3api but web3Api so I need to fix this by manually changing the file name in node_modules Moralis package in order to have correct typings on Web3Api property. I’d be happy for a quickfix of this. Thank you:)

2 Likes

Hey @microHoffman

Thank you for the report :raised_hands:

Moralis JS SDK is now open source. So if you want you can create PR yourself https://github.com/MoralisWeb3/Moralis-JS-SDK or I can do PR myself

Oh great! I’ve created PR - https://github.com/MoralisWeb3/Moralis-JS-SDK/pull/17 . Thanks:)

2 Likes

I’m adding here a sed script if anyone has a similar issue as I and wants to have their typings fixed automatically after npm/yarn install. Add this to your postinstall hook in package.json:

sed -i '[email protected]/[email protected]/[email protected]' node_modules/moralis/types/index.d.ts.