Skip to content

Conversation

vatro
Copy link

@vatro vatro commented Mar 19, 2021

Add autocompletion for accessors.

vatro-svelte-language-tools-add-accessors-autocomplete

Vatroslav Vrbanic added 14 commits March 18, 2021 18:02
If the component option `accessors` is present / present and set to `true`, add getters and setters to the generated Svelte2TsxComponent class for each exported `let` prop. This way we get autocomplete / intellisense for accessors.
turns out we don't even need it, setter parameter type can be inferred via the corresponding getter, which is also always generated for an accessor.
Remove linebreak (was breaking existing tests).
5 new 'uses-accessors' tests / 217 tests (all passing)
- setters with brackets
- `export const bar` don't create setters

All 217 test are passing.
@dummdidumm dummdidumm merged commit 8d7dfd6 into sveltejs:master Mar 19, 2021
@dummdidumm
Copy link
Member

Thanks for the PR! I'll deal with the lint/failing tests in a separate PR so we can get this in for today's release

@vatro
Copy link
Author

vatro commented Mar 19, 2021

Thanks for the PR! I'll deal with the lint/failing tests in a separate PR so we can get this in for today's release

I'm happy I could contribute! 😁 Keep up the great work! 👍🚀 + Thanks!

@vatro vatro deleted the add-accessors-autocomplete branch March 19, 2021 13:19
@vatro vatro mentioned this pull request May 7, 2021
3 tasks
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.

2 participants