Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest type definition install command using yarn when applicable #23231

Closed
astorije opened this issue Apr 6, 2018 · 2 comments
Closed

Suggest type definition install command using yarn when applicable #23231

astorije opened this issue Apr 6, 2018 · 2 comments
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript

Comments

@astorije
Copy link

astorije commented Apr 6, 2018

TypeScript Version: 2.8.1

Search Terms: yarn, Could not find a declaration, if it exists

Apologies if this was discussed before, I looked through issues and PRs, could not find anything.

When a yarn.lock file is present in the project directory, instead of recommending:

TS7016: Could not find a declaration file for module 'node-pkg'. '/[...]/node_modules/node-pkg/[...]' implicitly has an 'any' type.
Try `npm install @types/node-pkg` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-pkg';`

it would be nice if the suggested command could make use of yarn add instead:

TS7016: Could not find a declaration file for module 'node-pkg'. '/[...]/node_modules/node-pkg/[...]' implicitly has an 'any' type.
Try `yarn add @types/node-pkg` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-pkg';`
@mhegazy mhegazy added Suggestion An idea for TypeScript Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Apr 6, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Apr 6, 2018

Related to #19997

@RyanCavanaugh RyanCavanaugh added Declined The issue was declined as something which matches the TypeScript vision and removed Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature labels Jun 24, 2021
@RyanCavanaugh
Copy link
Member

This doesn't seem to be bothering anyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants