Skip to content

Conversation

@ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Jul 5, 2023

Description

This pull request checks the solution from embroider-build/addon-blueprint#136. It can also serve as a migration guide for v2 addons that use Glint.

@ijlee2 ijlee2 added the enhance: dependency Issue asks for a new or updated dependency label Jul 5, 2023
@ijlee2 ijlee2 marked this pull request as ready for review July 5, 2023 09:39
@ijlee2 ijlee2 force-pushed the remove-rollup-plugin-ts branch from 5f86b6d to a2641ca Compare July 5, 2023 09:51
@ijlee2 ijlee2 force-pushed the remove-rollup-plugin-ts branch from 3199e2b to 9a1d914 Compare July 5, 2023 15:49
Comment on lines +10 to +20
interface ElementHelperSignature<T extends string> {
Args: {
Positional: [name: T];
};
Return: ComponentLike<{
Blocks: { default: [] };
Element: T extends keyof HTMLElementTagNameMap
? HTMLElementTagNameMap[T]
: Element;
}>;
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,4 +1,3 @@
{{! @glint-ignore: ember-element-helper needs to provide Glint signature }}
Copy link
Owner Author

@ijlee2 ijlee2 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dan on Discord:

it looks like a bug

specifically, if I set noEmitOnError: false, declarations are emitted

I'm guessing it happens to work with --build because that will always emit declarations, regardless of errors (because --build prioritizes having declarations available for your other project references)

ah

it's because of the @glint-ignore here
https://github.com/ijlee2/ember-container-query/blob/4.0.4/ember-container-query/src/components/container-query.hbs#L1

the bug appears to be that TS internally is counting that as an error that triggers noEmitOnError behavior

if I add an entry for element in the registry in unpublished-development-types, everything works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhance: dependency Issue asks for a new or updated dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant