fix: svelte testing library type#16496
Conversation
🦋 Changeset detectedLatest commit: c08c3ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b250c9c to
59a9c0a
Compare
| '@astrojs/svelte': patch | ||
| --- | ||
|
|
||
| Adjusted the generated Svelte editor wrapper to avoid intersecting with the original `$$Component` type and instead use an explicit wrapper type with distinct Astro prop and Svelte internals call signatures. The change preserves generic inference by using `GenericPropsWithClientDirectives` for generic components, restores invalid prop errors in astro check, and maintains compatibility with `@testing-library/svelte`. |
There was a problem hiding this comment.
This changeset feels very internal and not fit for end-users. Please reword it https://contribute.docs.astro.build/docs-for-code-changes/changesets/#tips-and-examples
There was a problem hiding this comment.
Sure, let me check this.
Thank you.
There was a problem hiding this comment.
For separating tsconfig to create specifically for validating @testing-library/svelte compatibility.
There was a problem hiding this comment.
Then I think you should add a comment at the top and explain that, it's important knowledge that developers need to know
There was a problem hiding this comment.
Understood. Thank you.
59a9c0a to
642a87c
Compare
bd6a3eb to
799511f
Compare
799511f to
c08c3ce
Compare
|
Refector codes and update changeset contents. |
Changes
Close #15689
Adjusted the generated Svelte editor wrapper to avoid intersecting with the original
$$Componenttype and instead use an explicit wrapper type with distinct Astro prop and Svelte internals call signatures. The change preserves generic inference by usingGenericPropsWithClientDirectivesfor generic components, restores invalid prop errors in astro check, and maintains compatibility with@testing-library/svelte.Testing Before Implementation
Testing After Implementation