-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix: make static element
property available
#11079
Conversation
for the SvelteComponent type closes #8936
🦋 Changeset detectedLatest commit: d0bf47b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
packages/svelte/types/index.d.ts
Outdated
@@ -2215,7 +2218,7 @@ declare module 'svelte/transition' { | |||
* https://svelte.dev/docs/svelte-transition#crossfade | |||
* */ | |||
export function crossfade({ fallback, ...defaults }: CrossfadeParams & { | |||
fallback?: (node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig; | |||
fallback?: ((node: Element, params: CrossfadeParams, intro: boolean) => TransitionConfig) | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't update dts-buddy, @Rich-Harris why did this change? isn't the previous version more correct if you're using the "strict property types" option? are we just not using that in the compiler options and it's not available in strict mode by default? need to check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errr I have no idea. Seems like a TypeScript thing (nothing changed in dts-buddy that would cause that). Seems this is just undoing this recent change: 8cbe8c1#diff-b1326f5f98417cd282e68bc1e4e6b869e69156c42a36afd2fd0721927000bd36R2218
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Investigated a bit, if exactOptionalPropertyTypes
is true
the | undefined
should show up, else not - so it's correct that the recent change removed it. We could turn this flag (which is not part of strict mode) on later if needed (some people may rely on it and get errors when using our types) but that's a different story (and something that hasn't come up so far with the existing types).
for the SvelteComponent type
closes #8936
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint