File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 18
18
"license" : " MIT" ,
19
19
"homepage" : " https://codeboltai.github.io" ,
20
20
"dependencies" : {
21
- "@codebolt/common" : " ^1.0.3 " ,
21
+ "@codebolt/common" : " ^1.0.4 " ,
22
22
"typedoc-plugin-missing-exports" : " ^2.2.0" ,
23
23
"ws" : " ^8.17.0"
24
24
},
Original file line number Diff line number Diff line change 1
1
import cbws from './websocket' ;
2
-
2
+ import { GoToPageResponse , UrlResponse } from '@codebolt/common'
3
3
/**
4
4
* A module for interacting with a browser through WebSockets.
5
5
*/
@@ -19,7 +19,7 @@ const cbbrowser = {
19
19
* Retrieves the current URL of the browser's active page.
20
20
* @returns {Promise<any> } A promise that resolves with the URL.
21
21
*/
22
- getUrl : ( ) => {
22
+ getUrl : ( ) : Promise < UrlResponse > => {
23
23
return new Promise ( ( resolve , reject ) => {
24
24
cbws . getWebsocket . send ( JSON . stringify ( {
25
25
"type" : "browserEvent" ,
@@ -39,7 +39,7 @@ const cbbrowser = {
39
39
* @param {string } url - The URL to navigate to.
40
40
* @returns {Promise<any> } A promise that resolves when navigation is complete.
41
41
*/
42
- goToPage : ( url : string ) => {
42
+ goToPage : ( url : string ) : Promise < GoToPageResponse > => {
43
43
return new Promise ( ( resolve , reject ) => {
44
44
cbws . getWebsocket . send ( JSON . stringify ( {
45
45
"type" : "browserEvent" ,
You can’t perform that action at this time.
0 commit comments