typescript intellisense can't find second level index.ts

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

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

Đánh giá

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

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hành vi trong hai repository được liên kết, sau đó đọc bình luận được tham chiếu và issue #42247 để xem lại quá trình điều tra trước đó. Công việc được xem là hoàn tất khi xác định được liệu TypeScript có thể cung cấp các gợi ý IntelliSense cấp một và cấp hai cho index.ts hay không, hoặc khi một mẫu import được hỗ trợ và hoạt động được ghi lại.

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

Mô tả

Needs Investigation

Bug Report

it's reopening of #42247 as tested what was suggested and didn't work, opening it as I didn't get any more comment on that issue

https://github.com/microsoft/TypeScript/issues/42247#issuecomment-758863988

Auto-import assumes that an index.d.ts that re-exports a bunch of stuff is a "barrel" module that intends to provide a facade over an opaque directory hierarchy. So in that case, if you want the deeper path, you'd need to just import "./platform-browser/animations"; instead of re-exporting those members.

I tried @RyanCavanaugh suggestion but look like it doesn't work

🔎 Search Terms
  • index.ts
  • intellisense
🕗 Version & Regression Information
⏯ Playground Link

I created two repos, one following the suggestion and another one with normal index.ts

each repo has a gif showing that IntelliSense doesn't work!

https://github.com/mhamri/vscode-typescript-intellisense-bugs/tree/main/nx-lib-second-level-index-ts

and here is a repo of normal index.ts that still with path doesn't get discovered

https://github.com/mhamri/vscode-typescript-intellisense-bugs/tree/main/nx-lib-first-level-index-ts

🙁 Actual behavior

should get suggestions and IntelliSense for the first level and second level items. or typescript suggests a way that works. atm typescript doesn't give any IntelliSense for any of the second level index.ts for libraries like RxJs , Angular

Please check the original issue, more links to other repos are attached.

🙂 Expected behavior

typescript provides suggestion for the second level items.

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

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.

Issue khác của microsoft/TypeScript

Tất cả issue của microsoft/TypeScript

Issue tương tự

Thêm issue về Go

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.