You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out typecheck files are not retained even after the fix in
angular/angular#40162.
For a complete explanation of the situation, see prior issue:
#1030
This is because even after adding the typecheck files to the list of
files to retain, tsserver will still remove them from a project if they
do not exist on disk:
https://github.com/microsoft/TypeScript/blob/3c32f6e154ead6749b76ec9c19cbfdd2acad97d6/src/server/editorServices.ts#L2188-L2193
In order to force tsserver to retain the files, we need to fake their
existence. This is done in the `ServerHost`.
Admittedly, this is not a great fix because it relies on the knowledge
of the typecheck file suffix, which is an implementation detail in the
compiler.
The alternative is to explore the concept of "dynamic files", which are
files that exist only in memory and not on disk. This would require
changes to the Ivy compiler and `@angular/language-service`.
Ideally, the compiler should ask `@angular/language-service` how to name the
typecheck files, so that the naming is dictated by LS rather than
the compiler.
fix#1090
0 commit comments