microsoft / microsoft/TypeScript
tsserver: saveto command should also save inferred ("virtual") tsconfig
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.4k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 117
Descripción
Search Terms
tsserver saveto tsconfig
Suggestion
I want to store the content of the "virtual" tsconfig.json that is used by the ts server.
The Saveto comand stores source files. One might aswell allow to store the tsconfig.
Use Cases
I work on a code analysis component. Before I started to implement it, I created a vscode project to adjust settings and declaration files. Once everything worked as expected, I implemented the component that communicates with the tsserver. My implementation does not use a "physical" tsconfig. It relies on the tsconfig the server infers, based on commandline parameters and CompilerOptionsForInferredProjects.
My component updates ts and d.ts files in this virtual project based on user input. This is where problems might appear which are hard to debug within my limited "client".
For debugging and suport purposes I want to take a "snapshot" of the files the tsserver uses, and use vscode for further analysis.
Examples
The request sent to the server would look something like this:
{"arguments":{"tmpfile":"C:\\TEMP\\tsconfig.json","file":"tsconfig.json"},"command":"saveto","seq":0,"type":"request"}
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.
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
Comienza con el comando Saveto en src/server/protocol.ts y revisa CompilerOptionsForInferredProjects, ambos mencionados en el issue. Traza cómo se representan los proyectos inferidos y su tsconfig virtual antes de determinar cómo una solicitud saveto podría tomar una instantánea de uno de ellos. Se considera terminado cuando el comando puede almacenar el tsconfig inferido para la solicitud descrita sin cambiar el comportamiento existente de source-file.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- devtools
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100