Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export non-user-constructible TemplateFactory type #764

Merged
merged 1 commit into from Feb 14, 2023

Conversation

chriskrycho
Copy link
Contributor

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants