ionic-team / ionic-team/ionicons

Type string is not assignable to type InferPropType<StringConstructor>

オープン
#1,096 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
help wanted type: documentation
主要言語
TypeScript
スター
18.2k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using Vue3 with TypeScript:

```
import { IonIcon } from "@ionic/vue";
import { beer }from "ionicons/icons";

```

but am getting this TypeScript warning:
`Type string is not assignable to type InferPropType`

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、IonIconとビールアイコンを使ったVue 3およびTypeScriptの例を再現し、その後、IonIconのicon propがどのように型付けされているかを調べます。TypeScriptの警告が解消され、同じ例でアイコンが引き続き正しくレンダリングされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。