Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Sep 26, 2023
1 parent 562ec45 commit 3f17b5f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Source/Function/Exec.ts
Original file line number Diff line number Diff line change
@@ -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<Type>
Expand Down
19 changes: 19 additions & 0 deletions Source/Interface/Exec.ts
Original file line number Diff line number Diff line change
@@ -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<void>} A promise that resolves when the command execution is complete.
*/
(
Command: string,
// rome-ignore lint/suspicious/noExplicitAny:
Expand Down

0 comments on commit 3f17b5f

Please sign in to comment.