-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX types] Add missing type declarations in the preview types for @ember/template-compilation #20410
[BUGFIX types] Add missing type declarations in the preview types for @ember/template-compilation #20410
Conversation
1e9d934
to
9da91e8
Compare
precompileTemplate(`Hello World`, { strictMode: true, moduleName: 'hello', scope: () => ({}) }); | ||
|
||
// Integration, since this is the primary use case for precompileTemplate | ||
expectTypeOf(setComponentTemplate(precompileTemplate(`Hello World`), templateOnly())).toBeObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any value in keeping expectTypeOf here since setComponentTemplate is already tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to keep it here as well.
9da91e8
to
5b680b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple suggested changes!
… @ember/template-compilation
72cd1e2
to
8d18b07
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This is missing the |
Is it public api for It's from a different package: https://github.com/emberjs/ember.js/blob/main/packages/%40ember/template-compilation/index.ts#L4 |
It is indeed public API, and in fact is recommended by a different public API:
We can probably do a backport for the 4.12 LTS types as well stable; it is not relevant for 5.1 and after, where the types are present by way of compiling from course. |
Adds types for
@ember/template-compilation