microsoft / microsoft/TypeScript
AllowUnresolveNames not working for completion getters/setters and property signature and declaration
オープン
まだ誰も着手していません。
Domain: LS: Refactorings
Experience Enhancement
Suggestion
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
🔎 Search Terms
AllowUnresolveNames, "preserve type nodes"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about AllowUnresolvedNames and preserve types
⏯ Playground Link
💻 Code
interface A {
foo: import("./doesntexist.js").Foo;
get bar(): import("./doesntexist.js").Foo;
}
class B implements A {
// Trigger completion: "implement interface A" display this completion:
// Actual:
// foo: any;
// get bar(): any {
// throw new Error("Method not implemented.");
// }
// Expected:
// foo: import("./doesntexist.js").Foo;
// get bar(): import("./doesntexist.js").Foo {
// throw new Error("Method not implemented.");
// }
}
🙁 Actual behavior
Triggering completion uses any instead of the unresolved type.
🙂 Expected behavior
Completion should be the unresolved type instead of any
Additional information about the issue
Found in PR https://github.com/microsoft/TypeScript/pull/59440
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
interface A を実装する際は、リンク先の Playground で再現されている補完動作から始め、補完の getter/setter とプロパティ宣言に焦点を当てます。実際の any の出力を、想定される未解決の import 型と比較します。完了条件は、表示されるすべての補完が any を使用するのではなく、import("./doesntexist.js").Foo を保持することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100