microsoft / microsoft/TypeScript
AllowUnresolveNames not working for completion getters/setters and property signature and declaration
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ả
🔎 Search Terms
AllowUnresolveNames, "preserve type nodes"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about AllowUnresolvedNames and preserve types
⏯ Playground Link
💻 Code
interface A {
foo: import("./doesntexist.js").Foo;
get bar(): import("./doesntexist.js").Foo;
}
class B implements A {
// Trigger completion: "implement interface A" display this completion:
// Actual:
// foo: any;
// get bar(): any {
// throw new Error("Method not implemented.");
// }
// Expected:
// foo: import("./doesntexist.js").Foo;
// get bar(): import("./doesntexist.js").Foo {
// throw new Error("Method not implemented.");
// }
}
🙁 Actual behavior
Triggering completion uses any instead of the unresolved type.
🙂 Expected behavior
Completion should be the unresolved type instead of any
Additional information about the issue
Found in PR https://github.com/microsoft/TypeScript/pull/59440
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 với hành vi hoàn tất được tái hiện trong Playground được liên kết khi triển khai interface A, tập trung vào các getter/setter hoàn tất và các khai báo thuộc tính. So sánh đầu ra any thực tế với kiểu import chưa được phân giải dự kiến; được coi là hoàn tất khi tất cả các mục hoàn tất được hiển thị đều giữ nguyên import("./doesntexist.js").Foo thay vì sử dụng any.
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
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 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
- 48/100