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

Node: make types.ts only export types rather than the entire class/code #1119

Closed
ibc opened this issue Jul 13, 2023 · 1 comment
Closed

Node: make types.ts only export types rather than the entire class/code #1119

ibc opened this issue Jul 13, 2023 · 1 comment
Assignees
Milestone

Comments

@ibc
Copy link
Member

ibc commented Jul 13, 2023

Same as in versatica/mediasoup-client#273

NOTE: This was done in PR #1109 and later reverted here a9a34ca because it requires typescript >= 5 in the apps that import mediasoup-client.

This will be done again once we can assume that all users use typescript >= 5.

@ibc ibc added this to the v3 updates milestone Jul 13, 2023
@ibc ibc assigned ibc and jmillan Jul 13, 2023
@ibc
Copy link
Member Author

ibc commented Jul 20, 2023

Closing. We do want to export real JS classes. Why not? We want to be able to do this:

import { WebRtcTransport } from 'mediasoup/lib/types';

transport instanceof WebRtcTransport;

This is not possible if we export WebRtcTransport as a type.

@ibc ibc closed this as completed Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants