question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add TS declaration file

See original GitHub issue

Prerequisites

  • 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 containing declare module 'feather-icons';ts(7016)

Resources

  • Links
  • Screenshots Screenshot 2020-04-30 at 16 56 21

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mesqueebcommented, May 13, 2020

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: image

This means that there’s no autocomplete for icon names atm, and I don’t know when I misspelled one.

0reactions
mesqueebcommented, Aug 24, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found