Skip to content

Commit

Permalink
docs: document parameter in jsDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ComradeVanti committed Jan 14, 2024
1 parent 996ea2a commit 1061b73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import childProcess from "child_process";

/**
* @param command A shell command to execute.
* @returns A promise that resolve to the output of the shell command, or an
* @param trim Whether to trim whitespace from command output.
* @returns A promise that resolve to the output of the shell command, or an
* error.
* @example const output = await execute("ls -alh");
*/
Expand All @@ -17,10 +18,10 @@ export default function execute(
*/
return new Promise(function (resolve, reject) {
/**
* @param {Error} error An error triggered during the execution of the
* @param {Error} error An error triggered during the execution of the
* childProcess.exec command.
* @param {string|Buffer} stdout The result of the shell command execution.
* @param {string|Buffer} stderr The error resulting of the shell command
* @param {string|Buffer} stderr The error resulting of the shell command
* execution.
* @see https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback
*/
Expand Down

0 comments on commit 1061b73

Please sign in to comment.