microsoft / microsoft/TypeScript

Handling AssemblyScript input files

オープン
#31,713 コメント 14 件 リアクション 10 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Awaiting More Feedback Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

(Continuing from https://github.com/Microsoft/TypeScript/issues/10939)

I'd like to add another use case:

AssemblyScript. :)

It could be handy to have both .ts and .as files, to disambiguate the two.

For example, at the moment I have both src/ts/ and src/as/ folders to disambiguate the two.

It would also then be possible to have both some-project/index.ts and some-project/index.as, and which one is being imported in import foo from 'some-project' would depend on the file type.

The AssemblyScript guys are currently discussing how to make Node-style module resolution work, with the idea of an asmain field in package.json similar to main but for AS code, or defaulting to assembly/index.ts when there's no asmain field, because of ambiguity between AS and TS files.

Having an assembly/ folder at the root of a project (IMO) doesn't follow the convention in the web/JS community of having a src folder for sources.

If not allowing custom extensions for this, would the TypeScript team rather add another official extension? Perhaps even official AS types into the mix for such files (i32, i64, f32, etc, instead of just number)?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされている TypeScript issue #10939 と AssemblyScript issue #448 から始め、提案されている .as 拡張子、src/ts と src/as のレイアウト、および package.json の asmain の案を確認してください。完了には、TypeScript と AssemblyScript の入力を区別し、それらの間の import を解決するための方針を決定する必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
compilers
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。