microsoft / microsoft/TypeScript
Feat: Non-Detail view for Error Messages
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
Suggestion
The following is a case where I'm missing a single field from an object:
The amount of detail in this error message is very useful for extreme scenarios, but in a general day to day scenario, it's a bit overwhelming.
It would be really nice to have detailed messages like this hidden behind a "See More" item, and instead show the simplest form of the error. In this case the error could be
missing prop "fields" of type "object"
I don't need to know what the object type is, or what the parent type is. I can just get that error message later.
Use Cases
Almost 100% of the errors I get in TypeScript would be improved by this. It's very rare that I want to know all the information, and almost always that I just want a simple reminder of what tiny slip up it is.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
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 xem xét các ảnh chụp màn hình của issue, thông báo đơn giản hóa được đề xuất và các mục tiêu thiết kế TypeScript được liên kết trong checklist. Công việc hoàn tất khi các thông báo lỗi có thể hiển thị một dạng ngắn gọn trong khi vẫn giữ lại thông tin chi tiết phía sau một mục "See More", mà không thay đổi hành vi runtime.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, typescript
- Lĩnh vực
- compilers
- Loại issue
- Tính năng
- Độ 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
- 25/100