diff --git a/Source/Function/Exec.ts b/Source/Function/Exec.ts index 392299cd..0d71924d 100644 --- a/Source/Function/Exec.ts +++ b/Source/Function/Exec.ts @@ -1,12 +1,6 @@ /** - * The function 'Exec' is an asynchronous function that executes a command and logs the - * stdout of the child process. - * * @module Exec * - * @param {string} Command - The `Command` parameter is a string that represents the - * command you want to execute. It can be any valid command that can be executed in a - * terminal or command prompt. */ export default (async ( ...[Command, Echo = (Return) => console.log(Return)]: Parameters diff --git a/Source/Interface/Exec.ts b/Source/Interface/Exec.ts index 935b9699..74f1cd51 100644 --- a/Source/Interface/Exec.ts +++ b/Source/Interface/Exec.ts @@ -1,4 +1,23 @@ +/** + * @module Exec + * + */ export default interface Type { + /** + * The 'Exec' function is an asynchronous function that executes a command and logs the + * stdout of the child process. + * + * @param {string} Command - The 'Command' parameter is a string that represents the + * command you want to execute. It can be any valid command that can be executed in a + * terminal or command prompt. + * + * @param {boolean|function} [Echo] - An optional parameter that controls whether the stdout + * of the child process should be logged. If set to 'false', no logging will occur. If set + * to a function, the function will be called with the stdout data as a parameter for custom + * logging. If not provided, stdout will be logged to the console by default. + * + * @returns {Promise} A promise that resolves when the command execution is complete. + */ ( Command: string, // rome-ignore lint/suspicious/noExplicitAny: