ionic-team/ionicons

Type string is not assignable to type InferPropType<StringConstructor>

Offen

#1.096 geöffnet am 24.08.2022

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (2.083 Forks)batch import
help wantedtype: documentation

Repository-Metriken

Stars
 (17.256 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

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