TypeScript errors in mediasoup-client

I think my issue is similar to this one.

I’m trying to import mediasoup-client in my typescript project, but compilation fails due to a simple issue in /src/handlers/HandlerInterface.ts:104.

export * from 'mediasoup-client/src/types';

TypeScript error: /node_modules/mediasoup-client/src/handlers/HandlerInterface.ts(104,11): Error TS1243: ‘async’ modifier cannot be used with ‘abstract’ modifier.

I tried to ignore the error using exclude and skipLibCheck in my tsconfig.json, but that didn’t work.

What is the solution to this, or maybe more generally to errors in the library?
Should I wait for an update or maybe even submit a fix myself?

Just remove all async's in HandlerInterface.ts. New tsc version does not allow abstract async.

1 Like

I’ve created a pull request for a fix now (Fixed incompatibility with newer TypeScript versions by Minding000 · Pull Request #154 · versatica/mediasoup-client · GitHub).

It’s my first pull request, so I’m sorry if the form isn’t good.

Yeah, I thought of that, but really wasn’t sure - partly because of my setup.
I think it would be overwritten, when I update mediasoup-client.

As for pull requests - I’ve never submitted one before so it was a small hurdle. :smiley: