ionic-team/ionicons

Type string is not assignable to type InferPropType<StringConstructor>

Open

#1096 opened on Aug 24, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (17,256 stars) (2,083 forks)batch import
help wantedtype: documentation

Description

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.

Contributor guide