ember-cli / ember-cli-htmlbars

MIT License
77 stars 66 forks source link

Export non-user-constructible `TemplateFactory` type #764

Closed chriskrycho closed 1 year ago

chriskrycho commented 1 year ago

This allows users who need to name the type (e.g. for custom wiring with setComponentTemplate) to do so, while making it so that the type can only be constructed by calling hbs() in type terms and in the documentation for the item. Additionally, drop type-level compatibility with the export from htmlbars-inline-precompile, which was deprecated years ago, long before official TS support in this library.

This makes the blueprints generated when running ember-cli-typescript's generators type check correctly. While we do not recommend using template imports directly, many existing applications do so.