Update documentation for `getPort`, `getPorts`, `getSocket`
Update documentation for getPort, getPorts, getSocket
Follow the idea for docs from https://caolan.github.io/async/v3/docs.html#concat
see #168 and #169 for context.
Remove the *Promise based docs and only document getPort, getPorts, getSocket
Great issue for new contributors. Feel free to make a pull request! Don't hesitate to ask if you need help or are confused.
For this ticket, I feel like it might make sense to remove the function documentation from porfinder.js and have it purely live in portfinder.d.ts, where at this point I think most people's IDEs will pull from the type file if it's available. The alternative would be to duplicate the documentation in both places, which doesn't feel great imo, but happy to do it if you'd prefer. For the latter, this would change the documentation from whatever custom format it is in, to a more standardized jsdoc setup.
I would also still document the *Promise function variants, but purely have it be like:
/**
* Use getPort instead.
* @deprecated
*/
export function getPortPromise(options?: PortFinderOptions): Promise<number>;
where then within people's IDEs, they'll see the function call be crossed out, with a message on what they should migrate to: