ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

Type string is not assignable to type InferPropType<StringConstructor>

Open TomDeSmet opened this issue 3 years ago • 1 comments

I'm using Vue3 with TypeScript:

import { IonIcon } from "@ionic/vue";
import { beer }from "ionicons/icons";

<ion-icon :icon="beer" />

but am getting this TypeScript warning: Type string is not assignable to type InferPropType<StringConstructor>

After some googling I still don't understand what this means. What is a StringConstructor type that the icon prop expects? My code is working but I don't like errors/warnings in my code.

TomDeSmet avatar Aug 24 '22 22:08 TomDeSmet

This issue has been labeled as help wanted. This label is added to issues that we believe would be good for contributors.

If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.

For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation.

Thank you!

ionitron-bot[bot] avatar Apr 21 '25 16:04 ionitron-bot[bot]