-
-
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
[Bug] [Types] template-only <template> component cannot infer type #20556
Comments
looks like the answer is to set the default so I think the app blueprint should be updated to have |
this is now a blueprint issue over here: ember-cli/ember-cli#10391 closing. |
While I think it's fine to set Libraries also want to use template-only components and they will need I don't know what the proper fix would be, perhaps typescript would be happier if you had to list |
Initially reported: discourse/ember-route-template#3
🐞 Describe the Bug
Given this,
application.gts
,I get a squiggly underlining the whole export-default content
With this error:
You can try this out on this branch of the Polaris starter: NullVoxPopuli/polaris-starter#19
for reference, in VSCode:
I also asked about this in the dev-typescript discord: https://discord.com/channels/480462759797063690/786312479620726804/1162787399676473364
I know there is a "work-around" to just specify a type, but I'd really like inference to work 🤔
Something suspicious here is how
@glimmer/interfaces
is involved at all.This isn't specific to
ember-route-template
, as this problem happens on plain components as well:component:
🔬 Minimal Reproduction
This branch: NullVoxPopuli/polaris-starter#19 (this is a very small app with ~ 4 files, 3 in the components directory).
Try it here on stackblitz: https://stackblitz.com/github/NullVoxPopuli/polaris-starter/tree/upgrade-webpack
(j/k, stackblitz is using node 18.18.0, which breaks with webpack, and they need to upgrade to 18.18.1 for the app to boot)
🌍 Environment
➕ Additional Context
I've seen this error come and go before, and I know it can be brute-forced away by supplying explicit types, but:
@glimmer/interfaces
-- we really need to just cut 1.0 and get out of the goofiness that is pre 1.0 semantics.brb, my modules might be messed up
back, j/k, that wasn't it.
The text was updated successfully, but these errors were encountered: