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

Srf types not updated correctly sometime after 4.5.23 #160

Open
jeffwhelpley opened this issue Oct 11, 2023 · 3 comments
Open

Srf types not updated correctly sometime after 4.5.23 #160

jeffwhelpley opened this issue Oct 11, 2023 · 3 comments

Comments

@jeffwhelpley
Copy link

If you are using TypeScript with drachtio-srf, the following has type errors after 4.5.23 BUT no actual runtime errors (i.e. the objects are there, but the types are wrong):

import { parseUri } from 'drachtio-srf';

This function is not exposed at all on the types. It is actually exposed, though, and you can use it if you ignore the typing error.

Also, the type signature for the invite() function is:

Srf.invite(sipUri: string, options: any): void

Even though in reality the invite() function accepts a function with req and res. createB2BUA is not exposed on the Srf type either.

@benashby
Copy link

Came here looking for this. Unfortunately it seems several of the types are out of date. It may behoove one of us to pitch in and get a PR opened. I'll see if I can get a few updated for my current project and contribute them back.

@davehorton
Copy link
Collaborator

yeah I dont use TS myself so I rely on PRs for this feature

@danvirsen
Copy link
Contributor

I used locally defined types up until yesterday when I updated drachtio-srf and found that types were added a while ago. It broke my application though so I attempted to merge my local types with the ones in the repository.

Could you (@jeffwhelpley and @benashby) possibly help me test and see if something is wrong or missing?
#164

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

No branches or pull requests

4 participants