microsoft / microsoft/TypeScript
New error: Type 'string' is not assignable to type 'string & ...'
オープン
まだ誰も着手していません。
Docs
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
packages/linear-progress/src/mwc-linear-progress-base.ts:109:9 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'.
Type 'string' is not assignable to type '(property: string) => string'.
109 this.bufferElement
~~~~~~~~~~~~~~~~~~
110 .style[property as Exclude<keyof CSSStyleDeclaration, 'length'|'parentRule'>] =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packages/linear-progress/src/mwc-linear-progress-base.ts:119:9 - error TS2322: Type 'string' is not assignable to type 'string & ((property: string) => string) & ((property: string) => string) & ((index: number) => string) & ((property: string) => string) & ((property: string, value: string | null, priority?: string | undefined) => void)'.
Type 'string' is not assignable to type '(property: string) => string'.
119 this.primaryBar
~~~~~~~~~~~~~~~
120 .style[property as Exclude<keyof CSSStyleDeclaration, 'length'|'parentRule'>] =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To repro:
npm cinpm run build:stylingtsc -b -f
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
npm ci、npm run build:styling、tsc -b -f を使用して報告を再現します。109 行目と 119 行目の packages/linear-progress/src/mwc-linear-progress-base.ts を調査し、インデックス付き CSS スタイル割り当てで TS2322 が発生する理由を追跡します。報告されたエラーが、ビルドコマンドを壊すことなく解消されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100