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

breaking: required props should be inferred, remove @required tag #91

Merged
merged 6 commits into from
May 21, 2022

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented May 21, 2022

Fixes #22

#89 added a @required tag to denote a prop as optional. As pointed out in this comment, this is not the correct approach.

Any exported let prop that is uninitialized is required. This can be inferred from the AST.

As a result, @required is not needed. It can even be misleading.

<script>
  // required prop
  export let prop1;
</script>

@metonym metonym merged commit 06997cf into main May 21, 2022
@metonym metonym deleted the infer-required branch May 21, 2022 20:11
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

Successfully merging this pull request may close these issues.

The required props are generated as optional
1 participant