microsoft / microsoft/TypeScript
Outline view does not show props of typescript type
- 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ả
### 🔍 Search Terms
tsserver type outline view
### ✅ Viability Checklist
- [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [x] This wouldn't change the runtime behavior of existing JavaScript code
- [x] This could be implemented without emitting different JS based on the types of the expressions
- [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
### ⭐ Suggestion
When using typescript `interface` instead of `type`:
```
export interface User {
id?: string | undefined;
username: string;
}
```
the props are shown in the editor's `Outline view`.
However, when I have a typical typescript `type`:
```
export type User = {
id?: string | undefined;
username: string;
}
```
the props are not shown in the `Outline view` (e.g. VSCode or Eclipse Editor Outline View)
Please show the props in the `Ouline view` also for typescript `type`.
This issue was previously created on other repos and delegated to this repo:
- See https://github.com/eclipse-wildwebdeveloper/wildwebdeveloper/issues/1753#issuecomment-2919335238 for more information.
- See https://github.com/typescript-language-server/typescript-language-server/issues/960#issuecomment-3154878653
### 📃 Motivating Example
Show the props in the `Ouline view` also for typescript `type`.
### 💻 Use Cases
1. What do you want to use this for? for outline view
3. What shortcomings exist with current approaches? properties in the `Ouline view` does not appear for typescript `type`
4. What workarounds are you using in the meantime? nothing
Hướng dẫn đóng góp
Hướng nghiên cứu
Không có tệp nguồn hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng việc điều tra cách tsserver xử lý document-symbol hoặc outline, đồng thời so sánh các symbol được tạo ra cho các ví dụ về interface và type trong issue. Được xem là hoàn tất khi các thuộc tính của type alias xuất hiện trong chế độ xem Outline của trình soạn thảo giống như các thuộc tính của interface.
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
- developer-experience, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 35/100