microsoft / microsoft/TypeScript
Document quick fix (or whatever it's officially called)
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: 3.3.0-dev.201xxxxx
Search Terms:
code fix
quick fix
suggestion
Code
not entirely applicable, but this is what I had which caused me to get confused
const fs = require("fs");
Expected behavior:
Commandline tsc should behave the same as editor integrations
Actual behavior:
The "quick fix" feature, which appears to be called "code fixes" in the codebase and googling the messages led me to the json file which refers to them as "suggestions", only appears to exist in the typescript server.
As a newcomer this had me extremely confused. I was running tsc on the commandline and getting no errors, but seeing squiggly lines and messages in my editor (atom, in this case).
I was unable to find any documentation about where the message 'require' call may be converted to an import was coming from, or that this was a hint that typescript was able to fix my code for me.
It would also be helpful if the tsc client was able to list the code fix suggestions, even if giving it a way to apply them would be too complex.
Playground Link:
n/a
Related Issues:
none that I could find
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
Bắt đầu bằng cách so sánh hành vi của tsc trên dòng lệnh với TypeScript server và các tích hợp trình soạn thảo được mô tả trong issue. Theo dõi thuật ngữ code-fix trong codebase TypeScript và message JSON của nó, sau đó xác định xem chỉ tài liệu có đủ để bao quát khoảng trống hay việc liệt kê các đề xuất trong tsc cũng là bắt buộc; hoàn thành có nghĩa là thuật ngữ và hành vi được hỗ trợ đã được ghi rõ ràng trong tài liệu.
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
- cli, documentation
- Loại issue
- Tài liệu
- Độ 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
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100