simple-react-validator
simple-react-validator copied to clipboard
import statement compile error
Getting below error after import:
(17,4): An index signature parameter type cannot be a type alias. Consider writing '[key: string]: { message: string; rule: (val: any, params?: any) => boolean; }' instead.
Are you importing /src/simple-react-validator.js
and not the correct /dist/simple-react-validator.js
file by any chance? It should be the dist
you are importing. If not, please share some more details on what you are seeing.
I am using below statement for import as the import step mentioned in https://www.npmjs.com/package/simple-react-validator
import SimpleReactValidator from 'simple-react-validator';