feat(table): typescript/strong typing of cell templates
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Feature Description
Currently, `*matCellDef` types the resulting variable as `any`:

This issue is an attempt to bring https://github.com/angular/components/issues/16273 back in discussion, which has been closed as Ivy wasn't yet available.
There has been some progress on several fronts:
- Ivy now has `strictTemplates` mode.
- The experimental Ivy powered language server is almost ready to go.
It appears that the approach described in this comment https://github.com/angular/angular/issues/28731#issuecomment-782806178 might allow this to be implemented.
#### Use Case
As we've been converting more code to use Material Data Tables, the lack of strong typing has been really problematic, and it feels like a downgrade in developer experience compared to regular tables with `*ngFor`.
Further motivation for this has been described in:
https://github.com/angular/components/issues/16273
https://github.com/angular/angular/issues/28731
コントリビューションガイド
調査の方向性
まず Angular の strictTemplates コンテキストと、angular/components#16273 および angular/angular#28731 にある関連する議論、特にそこで参照されている実装アプローチを確認します。影響を受ける Material table のセルテンプレートの型付けエントリーポイントと、language service がそれらをどのように処理するかを特定します。セルテンプレートの変数が any ではなく有用なコンパイル時型を受け取り、関連するテンプレートケースをカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- developer-experience, frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100