microsoft / microsoft/TypeScript
fixUnusedIdentifier may remove a used side-effect
Chưa có ai nhận issue này.
- 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ả
TypeScript Version: 2.9.0-dev.20180506
Code
{ const x = launchMissiles(); }
Expected behavior:
const x = removed, and missiles still launched.
Actual behavior:
Missiles unlaunched.
Unfortunately we have no way of knowing whether a function call does have side effects (#17181), so doing this in general might be annoying as users have to manually delete function calls with unused results.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Start by locating the fixUnusedIdentifier entry point and reproduce the issue with the provided { const x = launchMissiles(); } example. Determine how unused identifiers are removed while preserving the function call's possible side effect, and verify that the compiled output still launches the missiles.
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
- Lĩnh vực
- compilers
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- 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