Skip to content

CheckStatus is an enum and shouldn't be exported as type#1855

Merged
1egoman merged 2 commits intolivekit:mainfrom
Ludobaka:fix/check-info-typing-export
Apr 3, 2026
Merged

CheckStatus is an enum and shouldn't be exported as type#1855
1egoman merged 2 commits intolivekit:mainfrom
Ludobaka:fix/check-info-typing-export

Conversation

@Ludobaka
Copy link
Copy Markdown
Contributor

CheckStatus is implemented as an enum in Checker.ts but re-exported as a type from ConnectionCheck.ts. This causes issues for users trying to use CheckStatus values directly, for instance when building custom connection tester logic.

With the current declaration, importing CheckStatus from livekit-client with verbatimModuleSyntax enabled (default in modern SvelteKit/Vite setups) raises a TS error, and using import type makes the enum values undefined at runtime.

Minimal reproduction: TypeScript Playground

Fix: CheckInfo is interface-only so it stays type, but CheckStatus is a runtime enum and shouldn't be marked as type-only.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 30, 2026

🦋 Changeset detected

Latest commit: 613d3f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

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

Copy link
Copy Markdown
Contributor

@1egoman 1egoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the contribution!

@1egoman 1egoman merged commit d1e0a5d into livekit:main Apr 3, 2026
2 checks passed
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