vue-fontawesome icon indicating copy to clipboard operation
vue-fontawesome copied to clipboard

Missing d.ts file for Vue - fortawesome

Open Grandizer opened this issue 6 years ago • 5 comments

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.

Grandizer avatar May 29 '18 19:05 Grandizer

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 avatar Jun 04 '18 13:06 r0skar

@r0skar we'll wait until we have the time to actually add TS support. I'd rather provide no support than poor support.

robmadole avatar Jun 04 '18 14:06 robmadole

I commented another topic, I found one solution, please see https://github.com/FortAwesome/vue-fontawesome/issues/24#issuecomment-414346052

I expect it helps!

antoniorib91 avatar Aug 20 '18 16:08 antoniorib91

@robmadole what's the status for TS support? Thanks!

pingustar avatar Dec 04 '18 10:12 pingustar

This may have been solved

meteorlxy avatar Jan 26 '19 02:01 meteorlxy

Closing this issue. Both our Vue 2 and Vue 3 components support TS with our Docs show how to import and add icons.

jasonlundien avatar Nov 03 '22 19:11 jasonlundien