ionic-team/ionicons

Type string is not assignable to type InferPropType<StringConstructor>

オープン

#1,096 opened on 2022/08/24

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (2,083 件のフォーク)batch import
help wantedtype: documentation

Repository metrics

Stars
 (17,256 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド