Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export TS types in a separate entry point via 'mediasoup-client/types'
## Details The idea is that, instead of exporting types like this: ```ts import { types as mediasoupClientTypes } from 'mediasoup-client'; ``` We import them this way: ```ts import types as mediasoupClientTypes from 'mediasoup-client/types'; ``` ## TODO 1 I've briefly tested this and it looks like for this to work, the parent application must have in its `tsconfig.json`: ``` "module": "nodenext", "moduleResolution": "nodenext", ``` Is this ok? Any other implications? ## TODO 2 Should we stop exporting `types` from 'mediasoup-client' and instead force applications to import them from 'mediasoup-client/types'? ## TODO 3 We should export `HandlerInterface` type so applications do not need to do this ugly thing: ```ts import { HandlerFactory as MediasoupClientHandlerFactory } from 'mediasoup-client/lib/handlers/HandlerInterface'; ```
- Loading branch information