SinglePickerPanelProps incorrectly extends BasePickerPanelProps under exactOptionalPropertyTypes
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
lib/PickerPanel/index.d.ts の宣言から始め、SinglePickerPanelProps が BasePickerPanelProps をどのように継承し、defaultValue を宣言しているかを確認してください。issue で提案されている型だけの変更を適用し、その後、strict と exactOptionalPropertyTypes を有効にし、skipLibCheck を無効にして tsc --noEmit を実行してください。パッケージの宣言が TS2430 なしでコンパイルされ、そのフラグを使わない利用者に対して props が変更されていなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
rc-picker 4.11.3, with TypeScript 7.0.2, "strict": true, "exactOptionalPropertyTypes": true, "skipLibCheck": false: its declarations report errors themselves (no error in user code is needed).
lib/PickerPanel/index.d.ts TS2430: Interface 'SinglePickerPanelProps' incorrectly extends interface 'BasePickerPanelProps'. Types of property 'defaultValue' are incompatible: it is redeclared as DateType | null over the inherited SharedTimeProps.defaultValue?: DateType.
Repro
{ "compilerOptions": { "strict": true, "exactOptionalPropertyTypes": true, "skipLibCheck": false,
"jsx": "react-jsx", "module": "esnext", "moduleResolution": "bundler", "noEmit": true } }
Import the package (or the antd 5 component that uses it) and run tsc --noEmit.
Fix (type-only; identical for consumers without the flag)
export interface SinglePickerPanelProps<DateType extends object = any> extends Omit<BasePickerPanelProps<DateType>, 'defaultValue'>. The resulting props are unchanged, since the interface redeclares defaultValue itself.
We run this as a local patch with no other changes. Happy to open a PR.
- 主要言語
- TypeScript
- スター
- 306
- フォーク
- 356
- 平均マージ
- 1時間 42分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/picker のほかの issue
-
Disabled date entered manually is not reverted on blur対応中かも @Ye-YiChen が 53 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
react-component/picker#1018 · コメント 2 件 ·
-
enter date manually in format YY prevent the user to add YYYY対応中かも @nrps9909 が 98 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
react-component/picker#956 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
react-component/picker#955 · コメント 1 件 · リアクション 1 件 ·
-
[Bug / DX]: Deep imports for generateConfig are incompatible with pnpm and break module resolution対応中かも @DanielChutkowskiJMMJ が 380 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
react-component/picker#949 ·
-
DatePicker does not trigger onChange when manually clearing input text対応中かも @nrps9909 が 98 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
react-component/picker#946 ·
react-component/picker の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Techiebutler/freeframe#687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 2 日以内に返信
-
enhancement from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
nightly-labs/openbot#23050 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
vercel-labs/skills#2967 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OHDSI/Data2Evidence#3846 ·
メンテナーはふだん 3 日以内に返信