Repository navigation
Typescript typings - #627
Conversation
|
Looks very nice! Is all the API covered? |
Oh, you already said it's a work in progress. Nice! |
|
What about having each type in the corresponding file and have a index.d.ts exporting them all? So we would have |
👍 looking good so far. |
Honestly, i don't think about it, may be do it in next PR 🙂 |
Are you thinking on completing the API in this PR? |
|
Yes. I already use this types in production |
I mean whether you are willing to complete the full public API in this PR. Since you say not all types are covered. |
|
Hi, I fully covered documented API and split into separate files 🙂 |
|
Let us some days to review this. Looks great BTW. |
53dd4ff to
5862905
Compare
|
@ibc can you please check it? It looks good to me so far. |
|
While this is a nice work (thanks a lot) I'm afraid this will be hard to maintain. For instance, it misses new API introduced in PR #629. Can you add it please? I think we should eventually rewrite the whole lib in TypeScript so it would be easier to maintain. |
ibc
left a comment
There was a problem hiding this comment.
LGTM. Just please add the new transportType in sendDTMF() which has been introcuded today.
It will be great. I think, i can help with it.
ок |
270b63d to
08c9d50
Compare
done |
|
@jmillan can we discuss this tomorrow? |
|
Merged into master, Thanks @phwb :-) |
|
@phwb, we'll announce the TS support in JsSIP and want to reference you if you are OK with it. Do you have a Twitter account or do you prefer to point to your Github one? |
Yes, it will be nice 🙂 you can use my Github account |
|
There you are: https://twitter.com/jomivi/status/1268085538042544133 Thanks! |
|
Hello. |
Hi, |
|
For example: import { Listener } from 'events'; And many issues in TypeScript github about this situation. Official position of this command - fix dependency in library |
thanks, i will look at this soon |
|
Adding it as |
|
I can't check but looks like devDependency is good move |
|
@arkaev you can install manually |
|
@phwb it's just an example. Problem more complex with many conflicts... And can be solved by typeRoots with manually fixed types. But it's ugly and unmantainable |
|
So basically @types/node is the culprit and should not be used as dependency? |
Sounds like yes, it should be replaced. I've done it because tsc does it. import {EventEmitter} from 'events'compile /// <reference types="node" />
import {EventEmitter} from 'events'
|
|
Although... If you want to rewrite all code into typescript, then you got same result /// <reference types="node" />
import {EventEmitter} from 'events'and |
|
@arkaev I think, that replace |
|
devDependencies should solve problem |
no, because |
|
Do you use something from node typings? Found regexpp package with @types/node as devDepenency but without reference in typings |
|
@arkaev my apologies, i mistake. I created an empty project one more time, compile it and tsc doesn't write |
Co-authored-by: Vitaliy Yakovenko <yakovenkovv@yandex-team.ru>

Hi! I've put together some Typescript typings. Please review. Not all types covered, I will continue work on it.