ionic-team/ionicons

Type string is not assignable to type InferPropType<StringConstructor>

Open

#1,096 创建于 2022年8月24日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)TypeScript (2,083 fork)batch import
help wantedtype: documentation

仓库指标

Star
 (17,256 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南