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

Use ReturnTypes of built-in functions for critical timers #1236

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

lukasIO
Copy link
Contributor

@lukasIO lukasIO commented Sep 2, 2024

A user reported an issue where they were running into a typescript compile error due to NodeJS.Timer being declared in timers.d.ts.

This is due to the fact that some of the client-sdk-js dependencies rely on @types/node which leads to the setTimeout and setInterval return types to be interpreted for NodeJS at build time.
In order to avoid this, we manually declare the types as ReturnType of said functions which will prevent references to NodeJS types in the build output.

Copy link

changeset-bot bot commented Sep 2, 2024

🦋 Changeset detected

Latest commit: f21da24

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
Contributor

github-actions bot commented Sep 2, 2024

size-limit report 📦

Path Size
dist/livekit-client.esm.mjs 81.67 KB (0%)
dist/livekit-client.umd.js 87.51 KB (0%)

@lukasIO lukasIO merged commit 90f311c into main Sep 2, 2024
3 checks passed
@lukasIO lukasIO deleted the lukas/avoid-nodejs-types branch September 2, 2024 10:21
@github-actions github-actions bot mentioned this pull request Sep 2, 2024
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