Document File name has a '.js' extension - stripping it
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
Issue にリンクされているモジュール解決の handbook ページから始め、現在の説明を .js と .jsx の例に対する traceResolution の出力と比較してください。どの拡張子が取り除かれ、どの lookup が続いて行われるのかを記録し、そのページがコンパイラーの動作を変更せずに両方の質問へ回答していることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
TypeScript Version: 4.2.0-dev.20201211
Search Terms: typescript File name has a '.js' extension - stripping it
Code
https://github.com/sguillia/ts-repro-III
other.ts
import * as index from "./index.js"
index.ts
export { }
Compile with:
tsc other.ts --traceResolution
Expected behavior:
Does not compile?
Actual behavior:
$ tsc other.ts --traceResolution
...
File name '/path/to/ts-repro-III/index.js' has a '.js' extension - stripping it.
...
This document is very good:
https://www.typescriptlang.org/docs/handbook/module-resolution.html
But it doesn't talk about resolution of modules with their extensions.
The actual behavior is fine but I did not manage to find its documentation
Same issue for jsx
$ tsc other.ts --traceResolution
...
File name '/path/to/ts-repro-III/index.jsx' has a '.jsx' extension - stripping it.
...
Would it be possible to document
- which extension are trimmed?
- what look-ups are performed based on the file name with extension stripped?
Playground Link: https://github.com/sguillia/ts-repro-III
Related Issues: no
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 106
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/TypeScript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
microsoft/TypeScript#64322 · コメント 2 件 · リアクション 1 件 · 担当者 2 名 ·
-
Possible Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/TypeScript#64278 · コメント 1 件 · リアクション 1 件 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/TypeScript#64118 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
microsoft/TypeScript#64094 ·
-
Docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
microsoft/TypeScript#63959 · コメント 5 件 ·
microsoft/TypeScript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
-
enhancement needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
kind/cleanup
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
kubernetes-sigs/kueue#15947 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sympozium-ai/sympozium#627 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100