TSServer: Find all reference for per overloaded function type

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu bằng cách điều tra hành vi của TSServer đối với find-references cho các hàm overloaded và cách nó xác định một overload được chọn. Xác định tiêu chí hoàn thành dựa trên các ví dụ: các tham chiếu cho overload 1 chỉ bao gồm use 1, trong khi overload 2 bao gồm use 2 và use 3.

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

Mô tả

Awaiting More Feedback Domain: LS: Refactorings Suggestion

Search Terms

Find references, overload, function, overloaded function

Suggestion

Provide a mechanism to search references of a function with particular overloaded type

Use Cases

In current implementation find all references for overloaded function shows all references for every overload
Some times we need to find references of particular overload only (i.e. a overload is deprecated and we want to update all use cases)

Examples

/**
 * @deprecated
 **/
declare function fn():void; // overload 1
declare function fn(param:string):number; // overload  2

fn(); // use 1

const x = fn('a'); // use 2
const y = fn('b'); // use 3

Finding references for overload 1 should list use 1.
Finding references for overload 2 should list use 2 and use 3.

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.
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.