Closed
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
3.0.1 but I think it's still the case in the v4
Link to runnable example
I don't have any 😕
Steps to reproduce
When using a TS project that depends on unist-util-select
, TypeScript throws this error:
unist-util-select/types/index.d.ts:3:20 - error TS2307: Cannot find module 'unist' or its corresponding type declarations.
3 import {Node} from 'unist'
~~~~~~~
To fix that, we could include @types/unist
in the dependencies (not devDeps) or in the peerDependencies of unist-util-select
, so that it'll be shipped / will notify the package manager that it needs @types/unist
Expected behavior
It shouldn't throw any error
Actual behavior
It throws this error:
unist-util-select/types/index.d.ts:3:20 - error TS2307: Cannot find module 'unist' or its corresponding type declarations.
3 import {Node} from 'unist'
~~~~~~~
Runtime
Node v16
Package manager
yarn v2
OS
macOS
Build and bundle tools
Webpack