microsoft / microsoft/TypeScript

IntelliSense Import Stops Working After One Import

Đang mở
#39,456 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Needs Investigation Rescheduled
Ngôn ngữ chính
Go
Star
111k
Fork
14.4k
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
117

Mô tả

TS Template added by @mjbvz

TypeScript Version: 3.9.5

Search Terms

  • npm link
  • linux
  • auto import

  • VSCode Version: 1.46.1
  • OS Version: Linux x64 5.3.0-61-generic snap

Steps to Reproduce:

I created a stripped down repo: https://github.com/shcca/vscode

  1. npm install
  2. cd packages/cli
  3. npm link ../core
  4. packages/core/test.ts and enter/save:
export const helloWorld1 = () => {}
  1. packages/cli/deploy.ts and add at the top:
import { helloWorld1 } from 'core'
  1. packages/cli/deploy.ts, within the handler function, add/save:
helloWorld1()
  1. packages/core/test.ts, add/save:
export const helloWorld2 = () => {}
  1. packages/core/deploy.ts, under helloWorld1(), enter helloWorld2().

IntelliSense doesn't pick up on helloWorld2(). The only way to get it work is to restart VSCode, but then helloWorld3() wouldn't work. This is something that broke recently because I've been working in this project structure for a while with no issues.

Does this issue occur when all extensions are disabled?: Yes

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện vấn đề bằng cách sử dụng repository shcca/vscode được liên kết và các bước npm link đã nêu, sau đó kiểm tra đường dẫn TypeScript IntelliSense hoặc language-service liên quan đến việc cập nhật các export được liên kết. Hoàn thành nghĩa là các export mới được thêm, chẳng hạn như helloWorld2, được phát hiện mà không cần khởi động lại VS Code, với hành vi được xác minh bằng các bước tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript, vscode
Lĩnh vực
developer-experience, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.