microsoft / microsoft/TypeScript
Outline view does not show props of typescript type
- Langage dominant
- Go
- Étoiles
- 111k
- Forks
- 14.3k
- Merge moyen
- 2 j 4 h
- PR mergées (30 j)
- 132
Description
### 🔍 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Aucun fichier source ni test n’est indiqué. Commencez par examiner la gestion de document-symbol ou outline dans tsserver, en comparant les symboles produits pour les exemples d’interface et de type de l’issue. Le travail est terminé lorsque les propriétés du type alias apparaissent dans la vue Outline de l’éditeur, comme les propriétés de l’interface.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript
- Domaine
- developer-experience, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100