Standalone .hbs-only components probably unsupportable in Glint 2
Classic two-file .ts + .hbs components will be (and are already partially) supported in Glint 2, but it seems likely we won't be able to support type-checking standalone .hbs-only components due to some of the constraints/assumptions within Volar.
In short:
- The way two-file support works is that Volar will create a VirtualCode for all of the .ts files covered by tsconfig.
- The VirtualCode can specify a
getAssociatedFilehook, which it will use to try and find an associated .hbs file. If/once the associated file is found, it is linked and remembered in the future. - When a previously-associated .hbs file is opened in the editor, Volar can perform diagnostics on it by creating the transformed-to-TS file by combining the backing .ts file with the .hbs
In short, this scheme requires a backing .ts file to exist for any TS semantic functionality for .hbs to work.
I suspect that omitting support for standalone .hbs files for the purposes of Glint 2 is probably fine; people have the option of creating backing .ts files if they really want the type-checkability, or even better they should convert to .gts template-only files.
Sounds fine - using a ts file is currently the only way to get hbs file template-only components a signature.
I guess this should be closed as it's covered by https://github.com/typed-ember/glint/pull/933
I guess this should be closed as it's covered by #933
Correct, hbs support has been removed and won't be reinstated.