microsoft / microsoft/TypeScript

VSCode Angular 11 custom shared library auto-import suggestions are wrong

オープン
#42,878 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

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

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

説明

Bug Report

I'm trying to follow the Angular tutorial to use shared libraries: https://angular.io/guide/creating-libraries#creating-libraries

According to this section in the tutorial I am supposed to import the service like below but it is not suggested in the prompt:

import { CustomLibService } from "custom-lib";

When I try to import a shared service the quick fix suggests wrong import paths:
image

Auto import doesn't help either:

image

Possibly related to #37222

🔎 Search Terms

angular, custom library, auto-import, vscode, visual studio code

🕗 Version & Regression Information

C:>code --version
1.53.2
622cb03f7e070a9670c94bae1a45d78d7181fbd4
x64

C:>node --version
v12.18.4

Typescript: 4.1.2
Angular: 11.2.1

⏯ Playground Link

Github repo

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

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

はじめの一歩

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

調査の方向性

リンクされている GitHub の再現リポジトリから始め、VS Code 1.53.2、TypeScript 4.1.2、Angular 11.2.1 を使用して動作を確認します。共有ライブラリの auto-import と quick-fix の動作を追跡します。両方の候補が誤ったパスではなくパッケージインポート custom-lib を提示すれば完了です。

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

評価

技術スタック
angular, typescript, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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