simple-react-validator icon indicating copy to clipboard operation
simple-react-validator copied to clipboard

import statement compile error

Open Haseeb710 opened this issue 4 years ago • 2 comments

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.

Haseeb710 avatar Mar 27 '20 15:03 Haseeb710

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.

stuyam avatar Apr 09 '20 21:04 stuyam

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';

Haseeb710 avatar Apr 13 '20 14:04 Haseeb710