PreviewGroup declarations fail strict type checking with TS2430 in 1.10.1
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
Issue では公開済みの宣言 @rc-component/[email protected] PreviewGroup.d.ts を挙げ、TypeScript の strict モードでの最小再現例を提示しています。記載された依存関係をインストールし、npx tsc コマンドを実行して TS2430 を確認してから、グループと共有 preview config の宣言を調べてください。strict チェックが通り、グループのコールバックで引き続き info.current を数値として使える状態になれば完了です。
索引モデルが issue の本文から書いたものです。
説明
PR #529 proposes a fix for this error. Here is a minimal reproduction using the published npm package.
Reproduction
In an empty directory:
npm init -y
npm install @rc-component/[email protected] react@18 react-dom@18
npm install -D [email protected] @types/[email protected] @types/react-dom@18
echo "import '@rc-component/image/es/PreviewGroup';" > index.ts
npx tsc --noEmit --strict --skipLibCheck false --target es2020 --module esnext --moduleResolution bundler index.ts
Actual result
PreviewGroup.d.ts(6,18): error TS2430: Interface 'GroupPreviewConfig' incorrectly extends interface 'InternalPreviewConfig'.
Types of property 'imageRender' are incompatible.
The shared callback accepts info.current?: number, while the group callback requires info.current: number. The same error also reproduces with @types/[email protected].
Expected result
The published declarations should pass strict checking, and group callbacks should still be able to use info.current as a number.
- 主要言語
- TypeScript
- スター
- 211
- フォーク
- 128
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/image のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
react-component/image#482 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
react-component/image#430 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
react-component/image#375 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
react-component/image#374 ·
-
Image组件是否可以使用forwardRef定义,目前无法传入ref対応中かも @liamli-0822 が 639 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
react-component/image#372 · コメント 1 件 ·
react-component/image の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
Codex使用可 かんたん コード
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ryuki-moro/Nicomaru#348 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:crash-loop issue-rating: 🦞 diamond lobster P2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openclaw/openclaw#211919 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信