microsoft / microsoft/TypeScript
Outline view does not show props of typescript type
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.3k
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 132
Descripción
🔍 Search Terms
tsserver type outline view
✅ Viability Checklist
- 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, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- 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
- What do you want to use this for? for outline view
- What shortcomings exist with current approaches? properties in the
Ouline viewdoes not appear for typescripttype - What workarounds are you using in the meantime? nothing
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se indica ningún archivo fuente ni ninguna prueba. Empieza investigando el manejo de document-symbol u outline en tsserver y compara los símbolos producidos para los ejemplos de interface y type del issue. Se considera terminado cuando las propiedades del type alias aparecen en la vista Outline del editor, al igual que las propiedades de la interface.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- developer-experience, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100