ionic-team/ionicons

Type string is not assignable to type InferPropType<StringConstructor>

Ouverte

#1 096 ouverte le 24 août 2022

 (1 commentaire) (0 réaction) (0 personne assignée)TypeScript (2 083 forks)batch import
help wantedtype: documentation

Métriques du dépôt

Stars
 (17 256 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

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.

Guide contributeur