Skip to content

Conversation

@CJxD
Copy link

@CJxD CJxD commented Aug 24, 2022

Without listing the lodash types as a dependency, you get an error like this:

../../.yarn/__virtual__/react-debounce-render-virtual-213d9d5692/0/cache/react-debounce-render-npm-8.0.2-d6a1a3772f-a97119badb.zip/node_modules/react-debounce-render/dist/index.d.ts:2:34 - error TS2307: Cannot find module 'lodash' or its corresponding type declarations.

2 import { DebounceSettings } from 'lodash';

Type dependencies that will be needed by the end user should go in optionalDependencies rather than devDependencies.

Without listing the lodash types as a dependency, you get an error like this:

```
../../.yarn/__virtual__/react-debounce-render-virtual-213d9d5692/0/cache/react-debounce-render-npm-8.0.2-d6a1a3772f-a97119badb.zip/node_modules/react-debounce-render/dist/index.d.ts:2:34 - error TS2307: Cannot find module 'lodash' or its corresponding type declarations.

2 import { DebounceSettings } from 'lodash';
```

Type dependencies that will be needed by the end user should go in optionalDependencies rather than devDependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant