Include `@types/unist` in dependencies
Ayc0 opened this issue · comments
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
Sure! Can you work on a PR?
Hi! This was marked as ready to be worked on! Note that while this is ready to be worked on, nothing is said about priority: it may take a while for this to be solved.
Is this something you can and want to work on?
Team: please use the area/*
(to describe the scope of the change), platform/*
(if this is related to a specific one), and semver/*
and type/*
labels to annotate this. If this is first-timers friendly, add good first issue
and if this could use help, add help wanted
.
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.