microsoft / microsoft/TypeScript
TypeScript support for .mdx file extensions
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
Search Terms
- .mdx
- mdx
- mdx support
Suggestion
Could or would it be on the road map to allow type checking in non .ts files. In my case i'm specifically wondering if TypeScript can type check React components in .mdx files
Use Cases
I've written a gatsby plugin gatsby-mdx-embed that allows users to embed media content from YouTube, Twitter, Instagram etc in their .mdx files.
The plugin is written in TypeScript and all of the components have props. It would be sweet if when these components are used in .mdx files a user could either see the prop types by hovering over the component or more importantly would get a type error (squiggly line) in their code editor if the prop name is incorrect or of incorrect type.
Examples
Here's an example .mdx file
You can below there the Gist component accepts a gistLink prop of type string.
<Playground>
<Gist gistLink="PaulieScanlon/ca0cc9239176066492cb2aba435edbf7" />
</Playground>
If a user misspelled gistLink or provided a number / array or object etc the editor would alert them there's been an error in the prop type used.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue では TypeScript ファイル、テスト、またはエントリポイントが指定されていません。リンクされた .mdx の例から始め、TypeScript が .ts ではないファイルの型チェックをどのように処理しているかを追跡してください。.mdx ファイル内の React コンポーネントの props について、エディターのホバー情報と型エラーが表示されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- compilers
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100