add TS declaration file
See original GitHub issuePrerequisites
- Version: latest
- Are you running from source/master: npm
- Are you using a released build: yes
- Operating system: macOS
- Bits: ?
Step to reproduce
npm i feather-icons
import feather from 'feather-icons'
Actual behavior
doesn’t have a declaration file
Any message or error
Could not find a declaration file for module ‘feather-icons’. ‘/frontend/node_modules/feather-icons/dist/feather.js’ implicitly has an ‘any’ type. Try
npm install @types/feather-icons
if it exists or add a new declaration (.d.ts) file containingdeclare module 'feather-icons';
ts(7016)
Resources
- Links
- Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Documentation - Modules .d.ts - TypeScript
Create a new file in the root of your source tree: [libname].d.ts · Add declare module "[libname]" { } · Add the template...
Read more >A quick introduction to “Type Declaration” files and adding ...
In this lesson, we are going to take a closer look at type declaration files which are one of the key ingredients of...
Read more >Adding declarations file manually (TypeScript) - Stack Overflow
I created @types/<module_name> dir in my src and put there index.d.ts file with one line like above. It worked. – Vlad Ganshin. Mar...
Read more >TypeScript — Type Declaration Files | by Makesh Kumar
TypeScript itself comes with a bunch of type declaration files to support all JavaScript features. After installing TypeScript, navigate to the node_modules/ ...
Read more >Writing Declaration Files for @types - TypeScript
Declaration files, if you're not familiar, are just files that describe the shape of an existing JavaScript codebase to TypeScript. By using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also believe that the icon name should be a string literal with only possible icon names.
The current types don’t offer much help in that regard:
This means that there’s no autocomplete for icon names atm, and I don’t know when I misspelled one.
I want to stress again how difficult it is to work with the possible options to pass.
FeatherAttributes
gives no guidance on how this options object should look whatsoever.