TypeScript type definitions #2

Open
by Ghost opened 2 years ago · 1 comments
Ghost commented 2 years ago

Similar to how @types/walk exists for fs-walk.js, there should be a package with TypeScript type definitions for @root/walk.js

Currently, trying to use @root/walk.js with TypeScript (without setting noImplicitAny to false in the compiler options) results in an error like below:

src/controller.ts:5:22 - error TS7016: Could not find a declaration file for module '@root/walk'. '/home/murchu27/repos/apemusic-server/node_modules/@root/walk/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/root__walk` if it exists or add a new declaration (.d.ts) file containing `declare module '@root/walk';`
Similar to how [@types/walk](https://www.npmjs.com/package/@types/walk) exists for [fs-walk.js](https://git.coolaj86.com/coolaj86/fs-walk.js), there should be a package with TypeScript type definitions for @root/walk.js Currently, trying to use @root/walk.js with TypeScript (without setting `noImplicitAny` to false in the compiler options) results in an error like below: ``` src/controller.ts:5:22 - error TS7016: Could not find a declaration file for module '@root/walk'. '/home/murchu27/repos/apemusic-server/node_modules/@root/walk/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/root__walk` if it exists or add a new declaration (.d.ts) file containing `declare module '@root/walk';` ```
Owner

Hey @murchu27, I've copied this issue over to GitHub (https://github.com/therootcompany/walk.js/issues/1) and flagged it good first issue and up-for-grabs.

I think this could be a simple matter of adding jsdoc to the file.

Hey @murchu27, I've copied this issue over to GitHub (https://github.com/therootcompany/walk.js/issues/1) and flagged it good `first issue` and `up-for-grabs`. I think this could be a simple matter of adding jsdoc to the file.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.