@mediar-ai/terminator 0.20.10 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -304,7 +304,7 @@ export declare class Desktop {
304
304
  * @param {string} script - The JavaScript code to execute in browser context.
305
305
  * @returns {Promise<string>} The result of script execution.
306
306
  */
307
- executeBrowserScript(script: string): Promise<string>
307
+ executeBrowserScript<T = any>(scriptOrFunction: string | ((env?: any) => T) | { file: string; env?: any }, envOrOptions?: any): Promise<T>
308
308
  /**
309
309
  * (async) Delay execution for a specified number of milliseconds.
310
310
  * Useful for waiting between actions to ensure UI stability.
@@ -629,7 +629,7 @@ export declare class Element {
629
629
  * @param {string} script - The JavaScript code to execute.
630
630
  * @returns {Promise<string>} The result of script execution.
631
631
  */
632
- executeBrowserScript(script: string): Promise<string>
632
+ executeBrowserScript<T = any>(scriptOrFunction: string | ((env?: any) => T) | { file: string; env?: any }, envOrOptions?: any): Promise<T>
633
633
  /**
634
634
  * Get the UI tree starting from this element.
635
635
  * Returns a tree structure containing this element and all its descendants.