vue-fontawesome
vue-fontawesome copied to clipboard
Missing d.ts file for Vue - fortawesome
This started here but was suggested by @robmadole to create an issue.
Hello,
So I have a Vue page that is working. Now I am trying to add my Font Awesome Pro icons to it and following your directions. The top of my pages .ts file looks like this.
import fontawesome from "@fortawesome/fontawesome";
import FontAwesomeIcon from "@fortawesome/vue-fontawesome";
import { faCoffee } from "@fortawesome/fontawesome-pro-regular";
import regular from "@fortawesome/fontawesome-pro-regular";
However, in Visual Studio 2017, I am getting an error on the vue-fontawesome line. Specifically:
TS7016 TypeScript (TS) Could not find a declaration file for module. implicitly has an 'any' type. Try npm install @types/fortawesome__vue-fontawesome
if it exists or add a new declaration (.d.ts) file containing declare module;
Seems like each of the above folders actually have an index.d.ts file except for the vue-fontawesome folder. Should there be one? If not, how do I get around this error.
See this https://github.com/FortAwesome/vue-fontawesome/issues/24#issuecomment-352944585 on how to add a global declaration file. This wont actually enable typescript integration, but should get rid of the error.
@r0skar we'll wait until we have the time to actually add TS support. I'd rather provide no support than poor support.
I commented another topic, I found one solution, please see https://github.com/FortAwesome/vue-fontawesome/issues/24#issuecomment-414346052
I expect it helps!
@robmadole what's the status for TS support? Thanks!
This may have been solved
Closing this issue. Both our Vue 2 and Vue 3 components support TS with our Docs show how to import and add icons.