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

Types Support #180

Open
aashutoshrathi opened this issue Sep 17, 2021 · 1 comment
Open

Types Support #180

aashutoshrathi opened this issue Sep 17, 2021 · 1 comment

Comments

@aashutoshrathi
Copy link

Hi @farhadi and maintainers,
I wanted to use this package in a TS Project, was unable to find a type file for this.

Are there any plans to fire a PR at https://github.com/DefinitelyTyped/DefinitelyTyped?

In any case, can you outline a structure of basic Objects? So that I can contribute towards a Type file creation.
Thanks.

@juliangut
Copy link
Collaborator

Hi @aashutoshrathi

Currently there is no plan to support TS types, but you are very welcome to contribute them if you like

This is a basic outline of the objects and little docs

smpp.js

Server (extends from node's net.Server)
SecureServer (extends from node's tls.Server)

Session (returned from Server and SecureServer, extends from node's event.EventEmitter)

  • connect
  • pause
  • resume
  • close
  • destroy
  • send
  • dynamic method for each command possible (in defs.js) creates PDU objects (pdu.js)
  • on (attach to events)

pdu.js

PDU

  • response (creates correspondent response command's PDU)

defs.js

gsmCoder

  • detect
  • encode
  • decode

encodings

  • detect

udhCoder

  • getUdh

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

2 participants