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

Litelement properties initialized with an imported value does not have type or default value defined #60

Closed
2 tasks done
Niznikr opened this issue Jun 30, 2021 · 5 comments

Comments

@Niznikr
Copy link

Niznikr commented Jun 30, 2021

Checklist

  • Did you run the analyzer with the --dev flag to get more information?
  • Did you create a minimal reproduction in the playground?

Completing the items above will greatly improve triaging time of your issue.

Expected behavior
Properties of a lit component that get initialized from an imported module (here's an example) do not have a type or default value defined in the manifest (in this case it would be string and 3.5rem). This was working correctly with web-component-analyzer.

@thepassle
Copy link
Member

Could you provide a minimal reproduction? Its not entirely clear to me what you're importing and expecting to be output

@Niznikr
Copy link
Author

Niznikr commented Jun 30, 2021

Here's the best I can do (not sure how to include another file in the playground). You can assume TEST_VALUE is imported from a separate JS/TS file.

@Niznikr
Copy link
Author

Niznikr commented Jul 1, 2021

In that example I'd expect foo to have "type": {"text": "string"} and "default": "'hello'"

@thepassle
Copy link
Member

Just as an update, I'm working on this in #69

It should be mostly done, but i'd like to take some more time to iron out the edge cases.

@thepassle
Copy link
Member

This should be fixed in 0.4.8 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants