Skip to content

Conversation

@fredrikekelund
Copy link

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

Tip

Exclude whitespace changes when looking at the PR diff to see that I haven't actually changed all that much.

pm2 exports two members in the programmatic interface: default (an instance of API) and custom (the API class). However, the custom prop is not included in types/index.d.ts.

This PR fixes that problem by moving all function definitions inside an API class in types/index.d.ts. We then use this single definition to declare both the default and custom exports.

I also took the opportunity to update the start type definitions to take an ErrProcsCallback as the second parameter (a callback where the second argument is Proc[] instead of Proc).

@CLAassistant
Copy link

CLAassistant commented Dec 3, 2025

CLA assistant check
All committers have signed the CLA.

Comment on lines +786 to +801
type ProcessStatus =
| "online"
| "stopping"
| "stopped"
| "launching"
| "errored"
| "one-launch-status"
| "waiting_restart";
type Platform =
| "ubuntu"
| "centos"
| "redhat"
| "gentoo"
| "systemd"
| "darwin"
| "amazon";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Several parts of this diff are just auto-formatting. This is one example.

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.

2 participants