react-easy-crop: Can't import Point, Area types into a TypeScript project
Describe the bug When I follow the typescript tutorial for this module and I add: import { Point, Area } from ‘react-easy-crop/types’, I get the following error:
Unable to resolve path to module 'react-easy-crop/types'
To Reproduce Steps to reproduce the behavior:
- Create typescript project which uses react-easy-crop
- Set up basic typescript react-easy-crop example
- Change baseUrl in tsconfig.json to “src”
- See error
Expected behavior Should react-easy-crop export types?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (10 by maintainers)
Hi, I don’t have a Typescript error on my end, but an eslint one (which is using typescript parser):
I’m writing a comment in this thread because it sounds related.
edit: I’m on v4.2.0 edit 2: Forget my comment, the import should be without trailing “/types” now, e.g.:
import { Area } from "react-easy-crop"The fix is available in https://github.com/ValentinH/react-easy-crop/releases/tag/v4.1.5