Skip to content

Add first draft of typescript definitions #3202

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

Merged
merged 2 commits into from
Oct 10, 2017

Conversation

jportela
Copy link
Contributor

@jportela jportela commented Oct 8, 2017

I've created a first draft of the typescript definitions file. I've attached a quick gif showing how it helps on developer workflow, even if the developer is not using Typescript (baked in in Visual Studio Code, but can easily be setup for other editors).

I've relied on the http://pm2.keymetrics.io/docs/usage/pm2-api/ documentation to create the definitions, since there's a lot of comments there I could reuse. However, this might not reflect accurately what's in code, so I'll be making a second pass at the code, making sure it accurately translates what's on the documentation. I might also add other functions that are not documented.

Let me know if this is a good direction to take this into, I hope this is helpful.

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #3186
License MIT
Doc PR https://github.com/pm2-hive/pm2-hive.github.io/pulls

typescript-definitions

@CLAassistant
Copy link

CLAassistant commented Oct 8, 2017

CLA assistant check
All committers have signed the CLA.

@vmarchaud
Copy link
Contributor

Thanks for looking into this, it definitely is the right direction.
I will try to add few myself and correct some if there is any error :)

@jportela
Copy link
Contributor Author

jportela commented Oct 8, 2017

as a reference, here's the generated typescript definitions by dts-gen:
https://gist.github.com/jportela/7e22bcd12375d3144e30d4445a144d46

@Unitech Unitech merged commit 196e541 into Unitech:development Oct 10, 2017
inerc pushed a commit to inerc/pm2 that referenced this pull request Feb 11, 2020
Add first draft of typescript definitions
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

Successfully merging this pull request may close these issues.

4 participants