Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

fix: compatibility with exactOptionalPropertyTypes#93

Open
Stadly wants to merge 1 commit into
huntabyte:mainfrom
Stadly:exact-optional-property-types
Open

fix: compatibility with exactOptionalPropertyTypes#93
Stadly wants to merge 1 commit into
huntabyte:mainfrom
Stadly:exact-optional-property-types

Conversation

@Stadly

@Stadly Stadly commented Jul 29, 2024

Copy link
Copy Markdown

With exactOptionalPropertyTypes enabled, optional properties cannot be undefined unless explicitly allowed. This commit explicitly allows optional properties to be undefined, making cmdk-sv usable in projects with exactOptionalPropertyTypes enabled.

The issue was discovered when fixing compatibility with exactOptionalPropertyTypes in shadcn-svelte in huntabyte/bits-ui#516, melt-ui/melt-ui#1256, svecosystem/paneforge#34, and huntabyte/vaul-svelte#86. This PR makes the Command component usable in projects with exactOptionalPropertyTypes enabled.

With [`exactOptionalPropertyTypes`](https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes) enabled, optional properties cannot be `undefined` unless explicitly allowed. This commit explicitly allows optional properties to be `undefined`, making cmdk-sv usable in projects with `exactOptionalPropertyTypes` enabled.
@changeset-bot

changeset-bot Bot commented Jul 29, 2024

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2116895

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jul 29, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cmdk-sv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 6:07am

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant