Skip to content
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

Replace internal instanceof checks with typeguards #1378

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Jan 22, 2025

No description provided.

Copy link

changeset-bot bot commented Jan 22, 2025

🦋 Changeset detected

Latest commit: efa1ace

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

@lukasIO lukasIO requested a review from davidzhao January 22, 2025 18:00
Copy link
Contributor

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 87.11 KB (+0.17% 🔺)
dist/livekit-client.umd.js 93.13 KB (+0.1% 🔺)

Copy link
Contributor

@bcherry bcherry left a comment

Choose a reason for hiding this comment

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

seems good although why not just use the instance methods like isLocal that you added to the types themselves?

@lukasIO
Copy link
Contributor Author

lukasIO commented Jan 22, 2025

unfortunately that doesn't narrow the types

@lukasIO lukasIO merged commit dee51bc into main Jan 22, 2025
3 checks passed
@lukasIO lukasIO deleted the lukas/remove-instanceof branch January 22, 2025 20:14
@github-actions github-actions bot mentioned this pull request Jan 22, 2025
@bcherry
Copy link
Contributor

bcherry commented Jan 22, 2025

ah got it that makes sense - still new to typescript but now I understand those method signatures... nice!

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