webdriver-bidi-protocol 0.0.1 → 0.0.4

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/out/gen/main.d.ts CHANGED
@@ -1,2080 +1,2171 @@
1
- export type Event = (({
2
- "type": ("event");
3
- } & EventData & Extensible));
4
- export type Command = (({
5
- "id": (JsUint);
6
- } & CommandData & Extensible));
7
- export type CommandResponse = (({
8
- "type": ("success");
9
- "id": (JsUint);
10
- "result": (ResultData);
11
- } & Extensible));
12
- export type EventData = (BrowsingContextEvent | LogEvent | NetworkEvent | ScriptEvent);
13
- export type CommandData = (BrowserCommand | BrowsingContextCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand | StorageCommand);
14
- export type ResultData = ((BrowsingContextResult | EmptyResult | NetworkResult | ScriptResult | SessionResult | StorageResult));
15
- export type EmptyParams = ((Extensible));
16
- export type Message = ((CommandResponse | ErrorResponse | Event));
17
- export type ErrorResponse = (({
18
- "type": ("error");
19
- "id": (JsUint | null);
20
- "error": (ErrorCode);
21
- "message": (string);
22
- "stacktrace"?: (string);
23
- } & Extensible));
24
- export type EmptyResult = ((Extensible));
25
- export type Extensible = ({
26
- [key: string]: (any);
27
- });
1
+ export type Event = {
2
+ type: 'event';
3
+ } & EventData &
4
+ Extensible;
5
+ export type Command = {
6
+ id: JsUint;
7
+ } & CommandData &
8
+ Extensible;
9
+ export type CommandResponse = {
10
+ type: 'success';
11
+ id: JsUint;
12
+ result: ResultData;
13
+ } & Extensible;
14
+ export type EventData =
15
+ | BrowsingContextEvent
16
+ | LogEvent
17
+ | NetworkEvent
18
+ | ScriptEvent;
19
+ export type CommandData =
20
+ | BrowserCommand
21
+ | BrowsingContextCommand
22
+ | InputCommand
23
+ | NetworkCommand
24
+ | ScriptCommand
25
+ | SessionCommand
26
+ | StorageCommand;
27
+ export type ResultData =
28
+ | BrowsingContextResult
29
+ | EmptyResult
30
+ | NetworkResult
31
+ | ScriptResult
32
+ | SessionResult
33
+ | StorageResult;
34
+ export type EmptyParams = Extensible;
35
+ export type Message = CommandResponse | ErrorResponse | Event;
36
+ export type ErrorResponse = {
37
+ type: 'error';
38
+ id: JsUint | null;
39
+ error: ErrorCode;
40
+ message: string;
41
+ stacktrace?: string;
42
+ } & Extensible;
43
+ export type EmptyResult = Extensible;
44
+ export type Extensible = {
45
+ [key: string]: any;
46
+ };
28
47
  /**
29
48
  * Must be between `-9007199254740991` and `9007199254740991`, inclusive.
30
49
  */
31
- export type JsInt = (number);
50
+ export type JsInt = number;
32
51
  /**
33
52
  * Must be between `0` and `9007199254740991`, inclusive.
34
53
  */
35
- export type JsUint = (number);
54
+ export type JsUint = number;
36
55
  export declare const enum ErrorCode {
37
- InvalidArgument = "invalid argument",
38
- InvalidSelector = "invalid selector",
39
- InvalidSessionId = "invalid session id",
40
- MoveTargetOutOfBounds = "move target out of bounds",
41
- NoSuchAlert = "no such alert",
42
- NoSuchElement = "no such element",
43
- NoSuchFrame = "no such frame",
44
- NoSuchHandle = "no such handle",
45
- NoSuchHistoryEntry = "no such history entry",
46
- NoSuchIntercept = "no such intercept",
47
- NoSuchNode = "no such node",
48
- NoSuchRequest = "no such request",
49
- NoSuchScript = "no such script",
50
- NoSuchStoragePartition = "no such storage partition",
51
- NoSuchUserContext = "no such user context",
52
- SessionNotCreated = "session not created",
53
- UnableToCaptureScreen = "unable to capture screen",
54
- UnableToCloseBrowser = "unable to close browser",
55
- UnableToSetCookie = "unable to set cookie",
56
- UnableToSetFileInput = "unable to set file input",
57
- UnderspecifiedStoragePartition = "underspecified storage partition",
58
- UnknownCommand = "unknown command",
59
- UnknownError = "unknown error",
60
- UnsupportedOperation = "unsupported operation"
61
- }
62
- export type SessionCommand = (Session.End | Session.New | Session.Status | Session.Subscribe | Session.Unsubscribe);
56
+ InvalidArgument = 'invalid argument',
57
+ InvalidSelector = 'invalid selector',
58
+ InvalidSessionId = 'invalid session id',
59
+ MoveTargetOutOfBounds = 'move target out of bounds',
60
+ NoSuchAlert = 'no such alert',
61
+ NoSuchElement = 'no such element',
62
+ NoSuchFrame = 'no such frame',
63
+ NoSuchHandle = 'no such handle',
64
+ NoSuchHistoryEntry = 'no such history entry',
65
+ NoSuchIntercept = 'no such intercept',
66
+ NoSuchNode = 'no such node',
67
+ NoSuchRequest = 'no such request',
68
+ NoSuchScript = 'no such script',
69
+ NoSuchStoragePartition = 'no such storage partition',
70
+ NoSuchUserContext = 'no such user context',
71
+ SessionNotCreated = 'session not created',
72
+ UnableToCaptureScreen = 'unable to capture screen',
73
+ UnableToCloseBrowser = 'unable to close browser',
74
+ UnableToSetCookie = 'unable to set cookie',
75
+ UnableToSetFileInput = 'unable to set file input',
76
+ UnderspecifiedStoragePartition = 'underspecified storage partition',
77
+ UnknownCommand = 'unknown command',
78
+ UnknownError = 'unknown error',
79
+ UnsupportedOperation = 'unsupported operation',
80
+ }
81
+ export type SessionCommand =
82
+ | Session.End
83
+ | Session.New
84
+ | Session.Status
85
+ | Session.Subscribe
86
+ | Session.Unsubscribe;
63
87
  export declare namespace Session {
64
- type ProxyConfiguration = ((Session.AutodetectProxyConfiguration | Session.DirectProxyConfiguration | Session.ManualProxyConfiguration | Session.PacProxyConfiguration | Session.SystemProxyConfiguration | Record<string, never>));
65
- }
66
- export type SessionResult = ((Session.NewResult | Session.StatusResult));
88
+ type ProxyConfiguration =
89
+ | Session.AutodetectProxyConfiguration
90
+ | Session.DirectProxyConfiguration
91
+ | Session.ManualProxyConfiguration
92
+ | Session.PacProxyConfiguration
93
+ | Session.SystemProxyConfiguration
94
+ | Record<string, never>;
95
+ }
96
+ export type SessionResult = Session.NewResult | Session.StatusResult;
67
97
  export declare namespace Session {
68
- type CapabilitiesRequest = (({
69
- "alwaysMatch"?: (Session.CapabilityRequest);
70
- "firstMatch"?: ([
71
- ...((Session.CapabilityRequest)[])
72
- ]);
73
- }));
98
+ type CapabilitiesRequest = {
99
+ alwaysMatch?: Session.CapabilityRequest;
100
+ firstMatch?: [...Session.CapabilityRequest[]];
101
+ };
74
102
  }
75
103
  export declare namespace Session {
76
- type CapabilityRequest = (({
77
- "acceptInsecureCerts"?: (boolean);
78
- "browserName"?: (string);
79
- "browserVersion"?: (string);
80
- "platformName"?: (string);
81
- "proxy"?: (Session.ProxyConfiguration);
82
- "unhandledPromptBehavior"?: (Session.UserPromptHandler);
83
- } & Extensible));
104
+ type CapabilityRequest = {
105
+ acceptInsecureCerts?: boolean;
106
+ browserName?: string;
107
+ browserVersion?: string;
108
+ platformName?: string;
109
+ proxy?: Session.ProxyConfiguration;
110
+ unhandledPromptBehavior?: Session.UserPromptHandler;
111
+ } & Extensible;
84
112
  }
85
113
  export declare namespace Session {
86
- type AutodetectProxyConfiguration = ({
87
- "proxyType": ("autodetect");
88
- } & Extensible);
114
+ type AutodetectProxyConfiguration = {
115
+ proxyType: 'autodetect';
116
+ } & Extensible;
89
117
  }
90
118
  export declare namespace Session {
91
- type DirectProxyConfiguration = ({
92
- "proxyType": ("direct");
93
- } & Extensible);
119
+ type DirectProxyConfiguration = {
120
+ proxyType: 'direct';
121
+ } & Extensible;
94
122
  }
95
123
  export declare namespace Session {
96
- type ManualProxyConfiguration = ({
97
- "proxyType": ("manual");
98
- "ftpProxy"?: (string);
99
- "httpProxy"?: (string);
100
- "sslProxy"?: (string);
101
- } & ({} | Session.SocksProxyConfiguration) & {
102
- "noProxy"?: ([
103
- ...((string)[])
104
- ]);
105
- } & Extensible);
124
+ type ManualProxyConfiguration = {
125
+ proxyType: 'manual';
126
+ ftpProxy?: string;
127
+ httpProxy?: string;
128
+ sslProxy?: string;
129
+ } & ({} | Session.SocksProxyConfiguration) & {
130
+ noProxy?: [...string[]];
131
+ } & Extensible;
106
132
  }
107
133
  export declare namespace Session {
108
- type SocksProxyConfiguration = ({
109
- "socksProxy": (string);
110
- /**
111
- * Must be between `0` and `255`, inclusive.
112
- */
113
- "socksVersion": (number);
114
- });
134
+ type SocksProxyConfiguration = {
135
+ socksProxy: string;
136
+ /**
137
+ * Must be between `0` and `255`, inclusive.
138
+ */
139
+ socksVersion: number;
140
+ };
115
141
  }
116
142
  export declare namespace Session {
117
- type PacProxyConfiguration = ({
118
- "proxyType": ("pac");
119
- "proxyAutoconfigUrl": (string);
120
- } & Extensible);
143
+ type PacProxyConfiguration = {
144
+ proxyType: 'pac';
145
+ proxyAutoconfigUrl: string;
146
+ } & Extensible;
121
147
  }
122
148
  export declare namespace Session {
123
- type SystemProxyConfiguration = ({
124
- "proxyType": ("system");
125
- } & Extensible);
149
+ type SystemProxyConfiguration = {
150
+ proxyType: 'system';
151
+ } & Extensible;
126
152
  }
127
153
  export declare namespace Session {
128
- const enum UserPromptHandlerType {
129
- Accept = "accept",
130
- Dismiss = "dismiss",
131
- Ignore = "ignore"
132
- }
154
+ const enum UserPromptHandlerType {
155
+ Accept = 'accept',
156
+ Dismiss = 'dismiss',
157
+ Ignore = 'ignore',
158
+ }
133
159
  }
134
160
  export declare namespace Session {
135
- type UserPromptHandler = (({
136
- "alert"?: (Session.UserPromptHandlerType);
137
- "beforeUnload"?: (Session.UserPromptHandlerType);
138
- "confirm"?: (Session.UserPromptHandlerType);
139
- "default"?: (Session.UserPromptHandlerType);
140
- "prompt"?: (Session.UserPromptHandlerType);
141
- }));
161
+ type UserPromptHandler = {
162
+ alert?: Session.UserPromptHandlerType;
163
+ beforeUnload?: Session.UserPromptHandlerType;
164
+ confirm?: Session.UserPromptHandlerType;
165
+ default?: Session.UserPromptHandlerType;
166
+ prompt?: Session.UserPromptHandlerType;
167
+ };
142
168
  }
143
169
  export declare namespace Session {
144
- type SubscriptionRequest = (({
145
- "events": ([
146
- (string),
147
- ...(string)[]
148
- ]);
149
- "contexts"?: ([
150
- (BrowsingContext.BrowsingContext),
151
- ...(BrowsingContext.BrowsingContext)[]
152
- ]);
153
- }));
170
+ type SubscriptionRequest = {
171
+ events: [string, ...string[]];
172
+ contexts?: [
173
+ BrowsingContext.BrowsingContext,
174
+ ...BrowsingContext.BrowsingContext[],
175
+ ];
176
+ };
154
177
  }
155
178
  export declare namespace Session {
156
- type Status = ({
157
- "method": ("session.status");
158
- "params": (EmptyParams);
159
- });
179
+ type Status = {
180
+ method: 'session.status';
181
+ params: EmptyParams;
182
+ };
160
183
  }
161
184
  export declare namespace Session {
162
- type StatusResult = (({
163
- "ready": (boolean);
164
- "message": (string);
165
- }));
185
+ type StatusResult = {
186
+ ready: boolean;
187
+ message: string;
188
+ };
166
189
  }
167
190
  export declare namespace Session {
168
- type New = ({
169
- "method": ("session.new");
170
- "params": (Session.NewParameters);
171
- });
191
+ type New = {
192
+ method: 'session.new';
193
+ params: Session.NewParameters;
194
+ };
172
195
  }
173
196
  export declare namespace Session {
174
- type NewParameters = (({
175
- "capabilities": (Session.CapabilitiesRequest);
176
- }));
197
+ type NewParameters = {
198
+ capabilities: Session.CapabilitiesRequest;
199
+ };
177
200
  }
178
201
  export declare namespace Session {
179
- type NewResult = (({
180
- "sessionId": (string);
181
- "capabilities": (({
182
- "acceptInsecureCerts": (boolean);
183
- "browserName": (string);
184
- "browserVersion": (string);
185
- "platformName": (string);
186
- "setWindowRect": (boolean);
187
- "userAgent": (string);
188
- "proxy"?: (Session.ProxyConfiguration);
189
- "unahandledPromptBehavior"?: (Session.UserPromptHandler);
190
- "webSocketUrl"?: (string);
191
- } & Extensible));
192
- }));
202
+ type NewResult = {
203
+ sessionId: string;
204
+ capabilities: {
205
+ acceptInsecureCerts: boolean;
206
+ browserName: string;
207
+ browserVersion: string;
208
+ platformName: string;
209
+ setWindowRect: boolean;
210
+ userAgent: string;
211
+ proxy?: Session.ProxyConfiguration;
212
+ unhandledPromptBehavior?: Session.UserPromptHandler;
213
+ webSocketUrl?: string;
214
+ } & Extensible;
215
+ };
193
216
  }
194
217
  export declare namespace Session {
195
- type End = ({
196
- "method": ("session.end");
197
- "params": (EmptyParams);
198
- });
218
+ type End = {
219
+ method: 'session.end';
220
+ params: EmptyParams;
221
+ };
199
222
  }
200
223
  export declare namespace Session {
201
- type Subscribe = ({
202
- "method": ("session.subscribe");
203
- "params": (Session.SubscriptionRequest);
204
- });
224
+ type Subscribe = {
225
+ method: 'session.subscribe';
226
+ params: Session.SubscriptionRequest;
227
+ };
205
228
  }
206
229
  export declare namespace Session {
207
- type Unsubscribe = ({
208
- "method": ("session.unsubscribe");
209
- "params": (Session.SubscriptionRequest);
210
- });
211
- }
212
- export type BrowserCommand = (Browser.Close | Browser.CreateUserContext | Browser.GetUserContexts | Browser.RemoveUserContext);
213
- export type BrowserResult = ((Browser.CreateUserContextResult | Browser.GetUserContextsResult));
230
+ type Unsubscribe = {
231
+ method: 'session.unsubscribe';
232
+ params: Session.SubscriptionRequest;
233
+ };
234
+ }
235
+ export type BrowserCommand =
236
+ | Browser.Close
237
+ | Browser.CreateUserContext
238
+ | Browser.GetUserContexts
239
+ | Browser.RemoveUserContext;
240
+ export type BrowserResult =
241
+ | Browser.CreateUserContextResult
242
+ | Browser.GetUserContextsResult;
214
243
  export declare namespace Browser {
215
- type UserContext = (string);
244
+ type UserContext = string;
216
245
  }
217
246
  export declare namespace Browser {
218
- type UserContextInfo = (({
219
- "userContext": (Browser.UserContext);
220
- }));
247
+ type UserContextInfo = {
248
+ userContext: Browser.UserContext;
249
+ };
221
250
  }
222
251
  export declare namespace Browser {
223
- type Close = ({
224
- "method": ("browser.close");
225
- "params": (EmptyParams);
226
- });
252
+ type Close = {
253
+ method: 'browser.close';
254
+ params: EmptyParams;
255
+ };
227
256
  }
228
257
  export declare namespace Browser {
229
- type CreateUserContext = ({
230
- "method": ("browser.createUserContext");
231
- "params": (EmptyParams);
232
- });
258
+ type CreateUserContext = {
259
+ method: 'browser.createUserContext';
260
+ params: EmptyParams;
261
+ };
233
262
  }
234
263
  export declare namespace Browser {
235
- type CreateUserContextResult = (Browser.UserContextInfo);
264
+ type CreateUserContextResult = Browser.UserContextInfo;
236
265
  }
237
266
  export declare namespace Browser {
238
- type GetUserContexts = ({
239
- "method": ("browser.getUserContexts");
240
- "params": (EmptyParams);
241
- });
267
+ type GetUserContexts = {
268
+ method: 'browser.getUserContexts';
269
+ params: EmptyParams;
270
+ };
242
271
  }
243
272
  export declare namespace Browser {
244
- type GetUserContextsResult = (({
245
- "userContexts": ([
246
- (Browser.UserContextInfo),
247
- ...(Browser.UserContextInfo)[]
248
- ]);
249
- }));
273
+ type GetUserContextsResult = {
274
+ userContexts: [Browser.UserContextInfo, ...Browser.UserContextInfo[]];
275
+ };
250
276
  }
251
277
  export declare namespace Browser {
252
- type RemoveUserContext = ({
253
- "method": ("browser.removeUserContext");
254
- "params": (Browser.RemoveUserContextParameters);
255
- });
278
+ type RemoveUserContext = {
279
+ method: 'browser.removeUserContext';
280
+ params: Browser.RemoveUserContextParameters;
281
+ };
256
282
  }
257
283
  export declare namespace Browser {
258
- type RemoveUserContextParameters = (({
259
- "userContext": (Browser.UserContext);
260
- }));
261
- }
262
- export type BrowsingContextCommand = (BrowsingContext.Activate | BrowsingContext.CaptureScreenshot | BrowsingContext.Close | BrowsingContext.Create | BrowsingContext.GetTree | BrowsingContext.HandleUserPrompt | BrowsingContext.LocateNodes | BrowsingContext.Navigate | BrowsingContext.Print | BrowsingContext.Reload | BrowsingContext.SetViewport | BrowsingContext.TraverseHistory);
263
- export type BrowsingContextEvent = (BrowsingContext.ContextCreated | BrowsingContext.ContextDestroyed | BrowsingContext.DomContentLoaded | BrowsingContext.DownloadWillBegin | BrowsingContext.FragmentNavigated | BrowsingContext.Load | BrowsingContext.NavigationAborted | BrowsingContext.NavigationFailed | BrowsingContext.NavigationStarted | BrowsingContext.UserPromptClosed | BrowsingContext.UserPromptOpened);
264
- export type BrowsingContextResult = ((BrowsingContext.CaptureScreenshotResult | BrowsingContext.CreateResult | BrowsingContext.GetTreeResult | BrowsingContext.LocateNodesResult | BrowsingContext.NavigateResult | BrowsingContext.PrintResult | BrowsingContext.TraverseHistoryResult));
265
- export declare namespace BrowsingContext {
266
- type BrowsingContext = (string);
267
- }
268
- export declare namespace BrowsingContext {
269
- type InfoList = ([
270
- ...((BrowsingContext.Info)[])
271
- ]);
272
- }
273
- export declare namespace BrowsingContext {
274
- type Info = (({
275
- "children": (BrowsingContext.InfoList | null);
276
- "context": (BrowsingContext.BrowsingContext);
277
- "originalOpener": (BrowsingContext.BrowsingContext | null);
278
- "url": (string);
279
- "userContext": (Browser.UserContext);
280
- "parent"?: (BrowsingContext.BrowsingContext | null);
281
- }));
282
- }
283
- export declare namespace BrowsingContext {
284
- type Locator = ((BrowsingContext.AccessibilityLocator | BrowsingContext.CssLocator | BrowsingContext.InnerTextLocator | BrowsingContext.XPathLocator));
285
- }
286
- export declare namespace BrowsingContext {
287
- type AccessibilityLocator = (({
288
- "type": ("accessibility");
289
- "value": (({
290
- "name"?: (string);
291
- "role"?: (string);
292
- }));
293
- }));
294
- }
284
+ type RemoveUserContextParameters = {
285
+ userContext: Browser.UserContext;
286
+ };
287
+ }
288
+ export type BrowsingContextCommand =
289
+ | BrowsingContext.Activate
290
+ | BrowsingContext.CaptureScreenshot
291
+ | BrowsingContext.Close
292
+ | BrowsingContext.Create
293
+ | BrowsingContext.GetTree
294
+ | BrowsingContext.HandleUserPrompt
295
+ | BrowsingContext.LocateNodes
296
+ | BrowsingContext.Navigate
297
+ | BrowsingContext.Print
298
+ | BrowsingContext.Reload
299
+ | BrowsingContext.SetViewport
300
+ | BrowsingContext.TraverseHistory;
301
+ export type BrowsingContextEvent =
302
+ | BrowsingContext.ContextCreated
303
+ | BrowsingContext.ContextDestroyed
304
+ | BrowsingContext.DomContentLoaded
305
+ | BrowsingContext.DownloadWillBegin
306
+ | BrowsingContext.FragmentNavigated
307
+ | BrowsingContext.Load
308
+ | BrowsingContext.NavigationAborted
309
+ | BrowsingContext.NavigationFailed
310
+ | BrowsingContext.NavigationStarted
311
+ | BrowsingContext.UserPromptClosed
312
+ | BrowsingContext.UserPromptOpened;
313
+ export type BrowsingContextResult =
314
+ | BrowsingContext.CaptureScreenshotResult
315
+ | BrowsingContext.CreateResult
316
+ | BrowsingContext.GetTreeResult
317
+ | BrowsingContext.LocateNodesResult
318
+ | BrowsingContext.NavigateResult
319
+ | BrowsingContext.PrintResult
320
+ | BrowsingContext.TraverseHistoryResult;
321
+ export declare namespace BrowsingContext {
322
+ type BrowsingContext = string;
323
+ }
324
+ export declare namespace BrowsingContext {
325
+ type InfoList = [...BrowsingContext.Info[]];
326
+ }
327
+ export declare namespace BrowsingContext {
328
+ type Info = {
329
+ children: BrowsingContext.InfoList | null;
330
+ context: BrowsingContext.BrowsingContext;
331
+ originalOpener: BrowsingContext.BrowsingContext | null;
332
+ url: string;
333
+ userContext: Browser.UserContext;
334
+ parent?: BrowsingContext.BrowsingContext | null;
335
+ };
336
+ }
337
+ export declare namespace BrowsingContext {
338
+ type Locator =
339
+ | BrowsingContext.AccessibilityLocator
340
+ | BrowsingContext.CssLocator
341
+ | BrowsingContext.InnerTextLocator
342
+ | BrowsingContext.XPathLocator;
343
+ }
344
+ export declare namespace BrowsingContext {
345
+ type AccessibilityLocator = {
346
+ type: 'accessibility';
347
+ value: {
348
+ name?: string;
349
+ role?: string;
350
+ };
351
+ };
352
+ }
353
+ export declare namespace BrowsingContext {
354
+ type CssLocator = {
355
+ type: 'css';
356
+ value: string;
357
+ };
358
+ }
359
+ export declare namespace BrowsingContext {
360
+ type InnerTextLocator = {
361
+ type: 'innerText';
362
+ value: string;
363
+ ignoreCase?: boolean;
364
+ matchType?: 'full' | 'partial';
365
+ maxDepth?: JsUint;
366
+ };
367
+ }
295
368
  export declare namespace BrowsingContext {
296
- type CssLocator = (({
297
- "type": ("css");
298
- "value": (string);
299
- }));
300
- }
369
+ type XPathLocator = {
370
+ type: 'xpath';
371
+ value: string;
372
+ };
373
+ }
374
+ export declare namespace BrowsingContext {
375
+ type Navigation = string;
376
+ }
301
377
  export declare namespace BrowsingContext {
302
- type InnerTextLocator = (({
303
- "type": ("innerText");
304
- "value": (string);
305
- "ignoreCase"?: (boolean);
306
- "matchType"?: ("full" | "partial");
307
- "maxDepth"?: (JsUint);
308
- }));
378
+ type NavigationInfo = {
379
+ context: BrowsingContext.BrowsingContext;
380
+ navigation: BrowsingContext.Navigation | null;
381
+ timestamp: JsUint;
382
+ url: string;
383
+ };
309
384
  }
310
385
  export declare namespace BrowsingContext {
311
- type XPathLocator = (({
312
- "type": ("xpath");
313
- "value": (string);
314
- }));
386
+ const enum ReadinessState {
387
+ None = 'none',
388
+ Interactive = 'interactive',
389
+ Complete = 'complete',
390
+ }
315
391
  }
316
392
  export declare namespace BrowsingContext {
317
- type Navigation = (string);
393
+ const enum UserPromptType {
394
+ Alert = 'alert',
395
+ Beforeunload = 'beforeunload',
396
+ Confirm = 'confirm',
397
+ Prompt = 'prompt',
398
+ }
318
399
  }
319
400
  export declare namespace BrowsingContext {
320
- type NavigationInfo = (({
321
- "context": (BrowsingContext.BrowsingContext);
322
- "navigation": (BrowsingContext.Navigation | null);
323
- "timestamp": (JsUint);
324
- "url": (string);
325
- }));
401
+ type Activate = {
402
+ method: 'browsingContext.activate';
403
+ params: BrowsingContext.ActivateParameters;
404
+ };
326
405
  }
327
406
  export declare namespace BrowsingContext {
328
- const enum ReadinessState {
329
- None = "none",
330
- Interactive = "interactive",
331
- Complete = "complete"
332
- }
407
+ type ActivateParameters = {
408
+ context: BrowsingContext.BrowsingContext;
409
+ };
333
410
  }
334
411
  export declare namespace BrowsingContext {
335
- const enum UserPromptType {
336
- Alert = "alert",
337
- Confirm = "confirm",
338
- Prompt = "prompt",
339
- Beforeunload = "beforeunload"
340
- }
412
+ type CaptureScreenshotParameters = {
413
+ context: BrowsingContext.BrowsingContext;
414
+ /**
415
+ * @defaultValue `"viewport"`
416
+ */
417
+ origin?: 'viewport' | 'document';
418
+ format?: BrowsingContext.ImageFormat;
419
+ clip?: BrowsingContext.ClipRectangle;
420
+ };
341
421
  }
342
422
  export declare namespace BrowsingContext {
343
- type Activate = ({
344
- "method": ("browsingContext.activate");
345
- "params": (BrowsingContext.ActivateParameters);
346
- });
423
+ type CaptureScreenshot = {
424
+ method: 'browsingContext.captureScreenshot';
425
+ params: BrowsingContext.CaptureScreenshotParameters;
426
+ };
347
427
  }
348
428
  export declare namespace BrowsingContext {
349
- type ActivateParameters = (({
350
- "context": (BrowsingContext.BrowsingContext);
351
- }));
429
+ type ImageFormat = {
430
+ type: string;
431
+ /**
432
+ * Must be between `0` and `1`, inclusive.
433
+ */
434
+ quality?: number;
435
+ };
352
436
  }
353
437
  export declare namespace BrowsingContext {
354
- type CaptureScreenshotParameters = (({
355
- "context": (BrowsingContext.BrowsingContext);
356
- /**
357
- * @defaultValue `"viewport"`
358
- */
359
- "origin"?: (("viewport" | "document"));
360
- "format"?: (BrowsingContext.ImageFormat);
361
- "clip"?: (BrowsingContext.ClipRectangle);
362
- }));
438
+ type ClipRectangle =
439
+ | BrowsingContext.BoxClipRectangle
440
+ | BrowsingContext.ElementClipRectangle;
363
441
  }
364
442
  export declare namespace BrowsingContext {
365
- type CaptureScreenshot = ({
366
- "method": ("browsingContext.captureScreenshot");
367
- "params": (BrowsingContext.CaptureScreenshotParameters);
368
- });
443
+ type ElementClipRectangle = {
444
+ type: 'element';
445
+ element: Script.SharedReference;
446
+ };
369
447
  }
370
448
  export declare namespace BrowsingContext {
371
- type ImageFormat = (({
372
- "type": (string);
373
- /**
374
- * Must be between `0` and `1`, inclusive.
375
- */
376
- "quality"?: (number);
377
- }));
449
+ type BoxClipRectangle = {
450
+ type: 'box';
451
+ x: number;
452
+ y: number;
453
+ width: number;
454
+ height: number;
455
+ };
378
456
  }
379
457
  export declare namespace BrowsingContext {
380
- type ClipRectangle = ((BrowsingContext.BoxClipRectangle | BrowsingContext.ElementClipRectangle));
458
+ type CaptureScreenshotResult = {
459
+ data: string;
460
+ };
381
461
  }
382
462
  export declare namespace BrowsingContext {
383
- type ElementClipRectangle = (({
384
- "type": ("element");
385
- "element": (Script.SharedReference);
386
- }));
463
+ type Close = {
464
+ method: 'browsingContext.close';
465
+ params: BrowsingContext.CloseParameters;
466
+ };
387
467
  }
388
468
  export declare namespace BrowsingContext {
389
- type BoxClipRectangle = (({
390
- "type": ("box");
391
- "x": (number);
392
- "y": (number);
393
- "width": (number);
394
- "height": (number);
395
- }));
469
+ type CloseParameters = {
470
+ context: BrowsingContext.BrowsingContext;
471
+ /**
472
+ * @defaultValue `false`
473
+ */
474
+ promptUnload?: boolean;
475
+ };
396
476
  }
397
477
  export declare namespace BrowsingContext {
398
- type CaptureScreenshotResult = (({
399
- "data": (string);
400
- }));
478
+ type Create = {
479
+ method: 'browsingContext.create';
480
+ params: BrowsingContext.CreateParameters;
481
+ };
401
482
  }
402
483
  export declare namespace BrowsingContext {
403
- type Close = ({
404
- "method": ("browsingContext.close");
405
- "params": (BrowsingContext.CloseParameters);
406
- });
484
+ const enum CreateType {
485
+ Tab = 'tab',
486
+ Window = 'window',
487
+ }
407
488
  }
408
489
  export declare namespace BrowsingContext {
409
- type CloseParameters = (({
410
- "context": (BrowsingContext.BrowsingContext);
411
- /**
412
- * @defaultValue `false`
413
- */
414
- "promptUnload"?: (boolean);
415
- }));
490
+ type CreateParameters = {
491
+ type: BrowsingContext.CreateType;
492
+ referenceContext?: BrowsingContext.BrowsingContext;
493
+ /**
494
+ * @defaultValue `false`
495
+ */
496
+ background?: boolean;
497
+ userContext?: Browser.UserContext;
498
+ };
416
499
  }
417
500
  export declare namespace BrowsingContext {
418
- type Create = ({
419
- "method": ("browsingContext.create");
420
- "params": (BrowsingContext.CreateParameters);
421
- });
501
+ type CreateResult = {
502
+ context: BrowsingContext.BrowsingContext;
503
+ };
422
504
  }
423
505
  export declare namespace BrowsingContext {
424
- const enum CreateType {
425
- Tab = "tab",
426
- Window = "window"
427
- }
506
+ type GetTree = {
507
+ method: 'browsingContext.getTree';
508
+ params: BrowsingContext.GetTreeParameters;
509
+ };
428
510
  }
429
511
  export declare namespace BrowsingContext {
430
- type CreateParameters = (({
431
- "type": (BrowsingContext.CreateType);
432
- "referenceContext"?: (BrowsingContext.BrowsingContext);
433
- /**
434
- * @defaultValue `false`
435
- */
436
- "background"?: (boolean);
437
- "userContext"?: (Browser.UserContext);
438
- }));
512
+ type GetTreeParameters = {
513
+ maxDepth?: JsUint;
514
+ root?: BrowsingContext.BrowsingContext;
515
+ };
439
516
  }
440
517
  export declare namespace BrowsingContext {
441
- type CreateResult = (({
442
- "context": (BrowsingContext.BrowsingContext);
443
- }));
518
+ type GetTreeResult = {
519
+ contexts: BrowsingContext.InfoList;
520
+ };
444
521
  }
445
522
  export declare namespace BrowsingContext {
446
- type GetTree = ({
447
- "method": ("browsingContext.getTree");
448
- "params": (BrowsingContext.GetTreeParameters);
449
- });
523
+ type HandleUserPrompt = {
524
+ method: 'browsingContext.handleUserPrompt';
525
+ params: BrowsingContext.HandleUserPromptParameters;
526
+ };
450
527
  }
451
- export declare namespace BrowsingContext {
452
- type GetTreeParameters = (({
453
- "maxDepth"?: (JsUint);
454
- "root"?: (BrowsingContext.BrowsingContext);
455
- }));
528
+ export declare namespace BrowsingContext {
529
+ type HandleUserPromptParameters = {
530
+ context: BrowsingContext.BrowsingContext;
531
+ accept?: boolean;
532
+ userText?: string;
533
+ };
534
+ }
535
+ export declare namespace BrowsingContext {
536
+ type LocateNodesParameters = {
537
+ context: BrowsingContext.BrowsingContext;
538
+ locator: BrowsingContext.Locator;
539
+ /**
540
+ * Must be greater than or equal to `1`.
541
+ */
542
+ maxNodeCount?: JsUint;
543
+ serializationOptions?: Script.SerializationOptions;
544
+ startNodes?: [Script.SharedReference, ...Script.SharedReference[]];
545
+ };
546
+ }
547
+ export declare namespace BrowsingContext {
548
+ type LocateNodes = {
549
+ method: 'browsingContext.locateNodes';
550
+ params: BrowsingContext.LocateNodesParameters;
551
+ };
552
+ }
553
+ export declare namespace BrowsingContext {
554
+ type LocateNodesResult = {
555
+ nodes: [...Script.NodeRemoteValue[]];
556
+ };
557
+ }
558
+ export declare namespace BrowsingContext {
559
+ type Navigate = {
560
+ method: 'browsingContext.navigate';
561
+ params: BrowsingContext.NavigateParameters;
562
+ };
563
+ }
564
+ export declare namespace BrowsingContext {
565
+ type NavigateParameters = {
566
+ context: BrowsingContext.BrowsingContext;
567
+ url: string;
568
+ wait?: BrowsingContext.ReadinessState;
569
+ };
570
+ }
571
+ export declare namespace BrowsingContext {
572
+ type NavigateResult = {
573
+ navigation: BrowsingContext.Navigation | null;
574
+ url: string;
575
+ };
576
+ }
577
+ export declare namespace BrowsingContext {
578
+ type Print = {
579
+ method: 'browsingContext.print';
580
+ params: BrowsingContext.PrintParameters;
581
+ };
582
+ }
583
+ export declare namespace BrowsingContext {
584
+ type PrintParameters = {
585
+ context: BrowsingContext.BrowsingContext;
586
+ /**
587
+ * @defaultValue `false`
588
+ */
589
+ background?: boolean;
590
+ margin?: BrowsingContext.PrintMarginParameters;
591
+ /**
592
+ * @defaultValue `"portrait"`
593
+ */
594
+ orientation?: 'portrait' | 'landscape';
595
+ page?: BrowsingContext.PrintPageParameters;
596
+ pageRanges?: [...(JsUint | string)[]];
597
+ /**
598
+ * Must be between `0.1` and `2`, inclusive.
599
+ *
600
+ * @defaultValue `1`
601
+ */
602
+ scale?: number;
603
+ /**
604
+ * @defaultValue `true`
605
+ */
606
+ shrinkToFit?: boolean;
607
+ };
608
+ }
609
+ export declare namespace BrowsingContext {
610
+ type PrintMarginParameters = {
611
+ /**
612
+ * Must be greater than or equal to `0`.
613
+ *
614
+ * @defaultValue `1`
615
+ */
616
+ bottom?: number;
617
+ /**
618
+ * Must be greater than or equal to `0`.
619
+ *
620
+ * @defaultValue `1`
621
+ */
622
+ left?: number;
623
+ /**
624
+ * Must be greater than or equal to `0`.
625
+ *
626
+ * @defaultValue `1`
627
+ */
628
+ right?: number;
629
+ /**
630
+ * Must be greater than or equal to `0`.
631
+ *
632
+ * @defaultValue `1`
633
+ */
634
+ top?: number;
635
+ };
636
+ }
637
+ export declare namespace BrowsingContext {
638
+ type PrintPageParameters = {
639
+ /**
640
+ * Must be greater than or equal to `0.0352`.
641
+ *
642
+ * @defaultValue `27.94`
643
+ */
644
+ height?: number;
645
+ /**
646
+ * Must be greater than or equal to `0.0352`.
647
+ *
648
+ * @defaultValue `21.59`
649
+ */
650
+ width?: number;
651
+ };
456
652
  }
457
- export declare namespace BrowsingContext {
458
- type GetTreeResult = (({
459
- "contexts": (BrowsingContext.InfoList);
460
- }));
653
+ export declare namespace BrowsingContext {
654
+ type PrintResult = {
655
+ data: string;
656
+ };
461
657
  }
462
- export declare namespace BrowsingContext {
463
- type HandleUserPrompt = ({
464
- "method": ("browsingContext.handleUserPrompt");
465
- "params": (BrowsingContext.HandleUserPromptParameters);
466
- });
658
+ export declare namespace BrowsingContext {
659
+ type Reload = {
660
+ method: 'browsingContext.reload';
661
+ params: BrowsingContext.ReloadParameters;
662
+ };
467
663
  }
468
- export declare namespace BrowsingContext {
469
- type HandleUserPromptParameters = (({
470
- "context": (BrowsingContext.BrowsingContext);
471
- "accept"?: (boolean);
472
- "userText"?: (string);
473
- }));
474
- }
475
- export declare namespace BrowsingContext {
476
- type LocateNodesParameters = (({
477
- "context": (BrowsingContext.BrowsingContext);
478
- "locator": (BrowsingContext.Locator);
479
- /**
480
- * Must be greater than or equal to `1`.
481
- */
482
- "maxNodeCount"?: ((JsUint));
483
- "serializationOptions"?: (Script.SerializationOptions);
484
- "startNodes"?: ([
485
- (Script.SharedReference),
486
- ...(Script.SharedReference)[]
487
- ]);
488
- }));
489
- }
490
- export declare namespace BrowsingContext {
491
- type LocateNodes = ({
492
- "method": ("browsingContext.locateNodes");
493
- "params": (BrowsingContext.LocateNodesParameters);
494
- });
495
- }
496
- export declare namespace BrowsingContext {
497
- type LocateNodesResult = (({
498
- "nodes": ([
499
- ...((Script.NodeRemoteValue)[])
500
- ]);
501
- }));
502
- }
503
- export declare namespace BrowsingContext {
504
- type Navigate = ({
505
- "method": ("browsingContext.navigate");
506
- "params": (BrowsingContext.NavigateParameters);
507
- });
508
- }
509
- export declare namespace BrowsingContext {
510
- type NavigateParameters = (({
511
- "context": (BrowsingContext.BrowsingContext);
512
- "url": (string);
513
- "wait"?: (BrowsingContext.ReadinessState);
514
- }));
515
- }
516
- export declare namespace BrowsingContext {
517
- type NavigateResult = (({
518
- "navigation": (BrowsingContext.Navigation | null);
519
- "url": (string);
520
- }));
521
- }
522
- export declare namespace BrowsingContext {
523
- type Print = ({
524
- "method": ("browsingContext.print");
525
- "params": (BrowsingContext.PrintParameters);
526
- });
527
- }
528
- export declare namespace BrowsingContext {
529
- type PrintParameters = (({
530
- "context": (BrowsingContext.BrowsingContext);
531
- /**
532
- * @defaultValue `false`
533
- */
534
- "background"?: (boolean);
535
- "margin"?: (BrowsingContext.PrintMarginParameters);
536
- /**
537
- * @defaultValue `"portrait"`
538
- */
539
- "orientation"?: (("portrait" | "landscape"));
540
- "page"?: (BrowsingContext.PrintPageParameters);
541
- "pageRanges"?: ([
542
- ...((JsUint | string)[])
543
- ]);
544
- /**
545
- * Must be between `0.1` and `2`, inclusive.
546
- *
547
- * @defaultValue `1`
548
- */
549
- "scale"?: ((number));
550
- /**
551
- * @defaultValue `true`
552
- */
553
- "shrinkToFit"?: (boolean);
554
- }));
555
- }
556
- export declare namespace BrowsingContext {
557
- type PrintMarginParameters = (({
558
- /**
559
- * Must be greater than or equal to `0`.
560
- *
561
- * @defaultValue `1`
562
- */
563
- "bottom"?: ((number));
564
- /**
565
- * Must be greater than or equal to `0`.
566
- *
567
- * @defaultValue `1`
568
- */
569
- "left"?: ((number));
570
- /**
571
- * Must be greater than or equal to `0`.
572
- *
573
- * @defaultValue `1`
574
- */
575
- "right"?: ((number));
576
- /**
577
- * Must be greater than or equal to `0`.
578
- *
579
- * @defaultValue `1`
580
- */
581
- "top"?: ((number));
582
- }));
583
- }
584
- export declare namespace BrowsingContext {
585
- type PrintPageParameters = (({
586
- /**
587
- * Must be greater than or equal to `0.0352`.
588
- *
589
- * @defaultValue `27.94`
590
- */
591
- "height"?: ((number));
592
- /**
593
- * Must be greater than or equal to `0.0352`.
594
- *
595
- * @defaultValue `21.59`
596
- */
597
- "width"?: ((number));
598
- }));
599
- }
600
- export declare namespace BrowsingContext {
601
- type PrintResult = (({
602
- "data": (string);
603
- }));
604
- }
605
- export declare namespace BrowsingContext {
606
- type Reload = ({
607
- "method": ("browsingContext.reload");
608
- "params": (BrowsingContext.ReloadParameters);
609
- });
610
- }
611
- export declare namespace BrowsingContext {
612
- type ReloadParameters = (({
613
- "context": (BrowsingContext.BrowsingContext);
614
- "ignoreCache"?: (boolean);
615
- "wait"?: (BrowsingContext.ReadinessState);
616
- }));
617
- }
618
- export declare namespace BrowsingContext {
619
- type SetViewport = ({
620
- "method": ("browsingContext.setViewport");
621
- "params": (BrowsingContext.SetViewportParameters);
622
- });
623
- }
624
- export declare namespace BrowsingContext {
625
- type SetViewportParameters = (({
626
- "context": (BrowsingContext.BrowsingContext);
627
- "viewport"?: (BrowsingContext.Viewport | null);
628
- /**
629
- * Must be greater than `0`.
630
- */
631
- "devicePixelRatio"?: ((number) | null);
632
- }));
633
- }
634
- export declare namespace BrowsingContext {
635
- type Viewport = (({
636
- "width": (JsUint);
637
- "height": (JsUint);
638
- }));
639
- }
640
- export declare namespace BrowsingContext {
641
- type TraverseHistory = ({
642
- "method": ("browsingContext.traverseHistory");
643
- "params": (BrowsingContext.TraverseHistoryParameters);
644
- });
664
+ export declare namespace BrowsingContext {
665
+ type ReloadParameters = {
666
+ context: BrowsingContext.BrowsingContext;
667
+ ignoreCache?: boolean;
668
+ wait?: BrowsingContext.ReadinessState;
669
+ };
645
670
  }
646
- export declare namespace BrowsingContext {
647
- type TraverseHistoryParameters = (({
648
- "context": (BrowsingContext.BrowsingContext);
649
- "delta": (JsInt);
650
- }));
671
+ export declare namespace BrowsingContext {
672
+ type SetViewport = {
673
+ method: 'browsingContext.setViewport';
674
+ params: BrowsingContext.SetViewportParameters;
675
+ };
651
676
  }
652
- export declare namespace BrowsingContext {
653
- type TraverseHistoryResult = ((Record<string, never>));
677
+ export declare namespace BrowsingContext {
678
+ type SetViewportParameters = {
679
+ context: BrowsingContext.BrowsingContext;
680
+ viewport?: BrowsingContext.Viewport | null;
681
+ /**
682
+ * Must be greater than `0`.
683
+ */
684
+ devicePixelRatio?: number | null;
685
+ };
686
+ }
687
+ export declare namespace BrowsingContext {
688
+ type Viewport = {
689
+ width: JsUint;
690
+ height: JsUint;
691
+ };
692
+ }
693
+ export declare namespace BrowsingContext {
694
+ type TraverseHistory = {
695
+ method: 'browsingContext.traverseHistory';
696
+ params: BrowsingContext.TraverseHistoryParameters;
697
+ };
698
+ }
699
+ export declare namespace BrowsingContext {
700
+ type TraverseHistoryParameters = {
701
+ context: BrowsingContext.BrowsingContext;
702
+ delta: JsInt;
703
+ };
704
+ }
705
+ export declare namespace BrowsingContext {
706
+ type TraverseHistoryResult = Record<string, never>;
654
707
  }
655
708
  export declare namespace BrowsingContext {
656
- type ContextCreated = ({
657
- "method": ("browsingContext.contextCreated");
658
- "params": (BrowsingContext.Info);
659
- });
709
+ type ContextCreated = {
710
+ method: 'browsingContext.contextCreated';
711
+ params: BrowsingContext.Info;
712
+ };
713
+ }
714
+ export declare namespace BrowsingContext {
715
+ type ContextDestroyed = {
716
+ method: 'browsingContext.contextDestroyed';
717
+ params: BrowsingContext.Info;
718
+ };
660
719
  }
661
720
  export declare namespace BrowsingContext {
662
- type ContextDestroyed = ({
663
- "method": ("browsingContext.contextDestroyed");
664
- "params": (BrowsingContext.Info);
665
- });
721
+ type NavigationStarted = {
722
+ method: 'browsingContext.navigationStarted';
723
+ params: BrowsingContext.NavigationInfo;
724
+ };
666
725
  }
667
726
  export declare namespace BrowsingContext {
668
- type NavigationStarted = ({
669
- "method": ("browsingContext.navigationStarted");
670
- "params": (BrowsingContext.NavigationInfo);
671
- });
727
+ type FragmentNavigated = {
728
+ method: 'browsingContext.fragmentNavigated';
729
+ params: BrowsingContext.NavigationInfo;
730
+ };
672
731
  }
673
732
  export declare namespace BrowsingContext {
674
- type FragmentNavigated = ({
675
- "method": ("browsingContext.fragmentNavigated");
676
- "params": (BrowsingContext.NavigationInfo);
677
- });
733
+ type DomContentLoaded = {
734
+ method: 'browsingContext.domContentLoaded';
735
+ params: BrowsingContext.NavigationInfo;
736
+ };
678
737
  }
679
738
  export declare namespace BrowsingContext {
680
- type DomContentLoaded = ({
681
- "method": ("browsingContext.domContentLoaded");
682
- "params": (BrowsingContext.NavigationInfo);
683
- });
739
+ type Load = {
740
+ method: 'browsingContext.load';
741
+ params: BrowsingContext.NavigationInfo;
742
+ };
684
743
  }
685
744
  export declare namespace BrowsingContext {
686
- type Load = ({
687
- "method": ("browsingContext.load");
688
- "params": (BrowsingContext.NavigationInfo);
689
- });
745
+ type DownloadWillBegin = {
746
+ method: 'browsingContext.downloadWillBegin';
747
+ params: BrowsingContext.NavigationInfo;
748
+ };
690
749
  }
691
750
  export declare namespace BrowsingContext {
692
- type DownloadWillBegin = ({
693
- "method": ("browsingContext.downloadWillBegin");
694
- "params": (BrowsingContext.NavigationInfo);
695
- });
751
+ type NavigationAborted = {
752
+ method: 'browsingContext.navigationAborted';
753
+ params: BrowsingContext.NavigationInfo;
754
+ };
696
755
  }
697
756
  export declare namespace BrowsingContext {
698
- type NavigationAborted = ({
699
- "method": ("browsingContext.navigationAborted");
700
- "params": (BrowsingContext.NavigationInfo);
701
- });
757
+ type NavigationFailed = {
758
+ method: 'browsingContext.navigationFailed';
759
+ params: BrowsingContext.NavigationInfo;
760
+ };
702
761
  }
703
762
  export declare namespace BrowsingContext {
704
- type NavigationFailed = ({
705
- "method": ("browsingContext.navigationFailed");
706
- "params": (BrowsingContext.NavigationInfo);
707
- });
763
+ type UserPromptClosed = {
764
+ method: 'browsingContext.userPromptClosed';
765
+ params: BrowsingContext.UserPromptClosedParameters;
766
+ };
708
767
  }
709
768
  export declare namespace BrowsingContext {
710
- type UserPromptClosed = ({
711
- "method": ("browsingContext.userPromptClosed");
712
- "params": (BrowsingContext.UserPromptClosedParameters);
713
- });
769
+ type UserPromptClosedParameters = {
770
+ context: BrowsingContext.BrowsingContext;
771
+ accepted: boolean;
772
+ type: BrowsingContext.UserPromptType;
773
+ userText?: string;
774
+ };
714
775
  }
715
776
  export declare namespace BrowsingContext {
716
- type UserPromptClosedParameters = (({
717
- "context": (BrowsingContext.BrowsingContext);
718
- "accepted": (boolean);
719
- "type": (BrowsingContext.UserPromptType);
720
- "userText"?: (string);
721
- }));
777
+ type UserPromptOpened = {
778
+ method: 'browsingContext.userPromptOpened';
779
+ params: BrowsingContext.UserPromptOpenedParameters;
780
+ };
722
781
  }
723
782
  export declare namespace BrowsingContext {
724
- type UserPromptOpened = ({
725
- "method": ("browsingContext.userPromptOpened");
726
- "params": (BrowsingContext.UserPromptOpenedParameters);
727
- });
783
+ type UserPromptOpenedParameters = {
784
+ context: BrowsingContext.BrowsingContext;
785
+ handler: 'accept' | 'dismiss' | 'ignore';
786
+ message: string;
787
+ type: BrowsingContext.UserPromptType;
788
+ defaultValue?: string;
789
+ };
728
790
  }
729
- export declare namespace BrowsingContext {
730
- type UserPromptOpenedParameters = (({
731
- "context": (BrowsingContext.BrowsingContext);
732
- "handler": ("accept" | "dismiss" | "ignore");
733
- "message": (string);
734
- "type": (BrowsingContext.UserPromptType);
735
- "defaultValue"?: (string);
736
- }));
737
- }
738
- export type NetworkCommand = (Network.AddIntercept | Network.ContinueRequest | Network.ContinueResponse | Network.ContinueWithAuth | Network.FailRequest | Network.ProvideResponse | Network.RemoveIntercept);
739
- export type NetworkEvent = (Network.AuthRequired | Network.BeforeRequestSent | Network.FetchError | Network.ResponseCompleted | Network.ResponseStarted);
740
- export type NetworkResult = ((Network.AddInterceptResult));
791
+ export type NetworkCommand =
792
+ | Network.AddIntercept
793
+ | Network.ContinueRequest
794
+ | Network.ContinueResponse
795
+ | Network.ContinueWithAuth
796
+ | Network.FailRequest
797
+ | Network.ProvideResponse
798
+ | Network.RemoveIntercept;
799
+ export type NetworkEvent =
800
+ | Network.AuthRequired
801
+ | Network.BeforeRequestSent
802
+ | Network.FetchError
803
+ | Network.ResponseCompleted
804
+ | Network.ResponseStarted;
805
+ export type NetworkResult = Network.AddInterceptResult;
741
806
  export declare namespace Network {
742
- type AuthChallenge = (({
743
- "scheme": (string);
744
- "realm": (string);
745
- }));
807
+ type AuthChallenge = {
808
+ scheme: string;
809
+ realm: string;
810
+ };
746
811
  }
747
812
  export declare namespace Network {
748
- type AuthCredentials = (({
749
- "type": ("password");
750
- "username": (string);
751
- "password": (string);
752
- }));
813
+ type AuthCredentials = {
814
+ type: 'password';
815
+ username: string;
816
+ password: string;
817
+ };
753
818
  }
754
819
  export declare namespace Network {
755
- type BaseParameters = ({
756
- "context": (BrowsingContext.BrowsingContext | null);
757
- "isBlocked": (boolean);
758
- "navigation": (BrowsingContext.Navigation | null);
759
- "redirectCount": (JsUint);
760
- "request": (Network.RequestData);
761
- "timestamp": (JsUint);
762
- "intercepts"?: ([
763
- (Network.Intercept),
764
- ...(Network.Intercept)[]
765
- ]);
766
- });
820
+ type BaseParameters = {
821
+ context: BrowsingContext.BrowsingContext | null;
822
+ isBlocked: boolean;
823
+ navigation: BrowsingContext.Navigation | null;
824
+ redirectCount: JsUint;
825
+ request: Network.RequestData;
826
+ timestamp: JsUint;
827
+ intercepts?: [Network.Intercept, ...Network.Intercept[]];
828
+ };
767
829
  }
768
830
  export declare namespace Network {
769
- type BytesValue = (Network.StringValue | Network.Base64Value);
831
+ type BytesValue = Network.StringValue | Network.Base64Value;
770
832
  }
771
833
  export declare namespace Network {
772
- type StringValue = (({
773
- "type": ("string");
774
- "value": (string);
775
- }));
834
+ type StringValue = {
835
+ type: 'string';
836
+ value: string;
837
+ };
776
838
  }
777
839
  export declare namespace Network {
778
- type Base64Value = (({
779
- "type": ("base64");
780
- "value": (string);
781
- }));
840
+ type Base64Value = {
841
+ type: 'base64';
842
+ value: string;
843
+ };
782
844
  }
783
845
  export declare namespace Network {
784
- const enum SameSite {
785
- Strict = "strict",
786
- Lax = "lax",
787
- None = "none"
788
- }
846
+ const enum SameSite {
847
+ Strict = 'strict',
848
+ Lax = 'lax',
849
+ None = 'none',
850
+ }
789
851
  }
790
852
  export declare namespace Network {
791
- type Cookie = (({
792
- "name": (string);
793
- "value": (Network.BytesValue);
794
- "domain": (string);
795
- "path": (string);
796
- "size": (JsUint);
797
- "httpOnly": (boolean);
798
- "secure": (boolean);
799
- "sameSite": (Network.SameSite);
800
- "expiry"?: (JsUint);
801
- } & Extensible));
853
+ type Cookie = {
854
+ name: string;
855
+ value: Network.BytesValue;
856
+ domain: string;
857
+ path: string;
858
+ size: JsUint;
859
+ httpOnly: boolean;
860
+ secure: boolean;
861
+ sameSite: Network.SameSite;
862
+ expiry?: JsUint;
863
+ } & Extensible;
802
864
  }
803
865
  export declare namespace Network {
804
- type CookieHeader = (({
805
- "name": (string);
806
- "value": (Network.BytesValue);
807
- }));
866
+ type CookieHeader = {
867
+ name: string;
868
+ value: Network.BytesValue;
869
+ };
808
870
  }
809
871
  export declare namespace Network {
810
- type FetchTimingInfo = (({
811
- "timeOrigin": (number);
812
- "requestTime": (number);
813
- "redirectStart": (number);
814
- "redirectEnd": (number);
815
- "fetchStart": (number);
816
- "dnsStart": (number);
817
- "dnsEnd": (number);
818
- "connectStart": (number);
819
- "connectEnd": (number);
820
- "tlsStart": (number);
821
- "requestStart": (number);
822
- "responseStart": (number);
823
- "responseEnd": (number);
824
- }));
872
+ type FetchTimingInfo = {
873
+ timeOrigin: number;
874
+ requestTime: number;
875
+ redirectStart: number;
876
+ redirectEnd: number;
877
+ fetchStart: number;
878
+ dnsStart: number;
879
+ dnsEnd: number;
880
+ connectStart: number;
881
+ connectEnd: number;
882
+ tlsStart: number;
883
+ requestStart: number;
884
+ responseStart: number;
885
+ responseEnd: number;
886
+ };
825
887
  }
826
888
  export declare namespace Network {
827
- type Header = (({
828
- "name": (string);
829
- "value": (Network.BytesValue);
830
- }));
889
+ type Header = {
890
+ name: string;
891
+ value: Network.BytesValue;
892
+ };
831
893
  }
832
894
  export declare namespace Network {
833
- type Initiator = (({
834
- "type": ("parser" | "script" | "preflight" | "other");
835
- "columnNumber"?: (JsUint);
836
- "lineNumber"?: (JsUint);
837
- "stackTrace"?: (Script.StackTrace);
838
- "request"?: (Network.Request);
839
- }));
895
+ type Initiator = {
896
+ type: 'parser' | 'script' | 'preflight' | 'other';
897
+ columnNumber?: JsUint;
898
+ lineNumber?: JsUint;
899
+ stackTrace?: Script.StackTrace;
900
+ request?: Network.Request;
901
+ };
840
902
  }
841
903
  export declare namespace Network {
842
- type Intercept = (string);
904
+ type Intercept = string;
843
905
  }
844
906
  export declare namespace Network {
845
- type Request = (string);
907
+ type Request = string;
846
908
  }
847
909
  export declare namespace Network {
848
- type RequestData = (({
849
- "request": (Network.Request);
850
- "url": (string);
851
- "method": (string);
852
- "headers": ([
853
- ...((Network.Header)[])
854
- ]);
855
- "cookies": ([
856
- ...((Network.Cookie)[])
857
- ]);
858
- "headersSize": (JsUint);
859
- "bodySize": (JsUint | null);
860
- "timings": (Network.FetchTimingInfo);
861
- }));
910
+ type RequestData = {
911
+ request: Network.Request;
912
+ url: string;
913
+ method: string;
914
+ headers: [...Network.Header[]];
915
+ cookies: [...Network.Cookie[]];
916
+ headersSize: JsUint;
917
+ bodySize: JsUint | null;
918
+ timings: Network.FetchTimingInfo;
919
+ };
862
920
  }
863
921
  export declare namespace Network {
864
- type ResponseContent = (({
865
- "size": (JsUint);
866
- }));
922
+ type ResponseContent = {
923
+ size: JsUint;
924
+ };
867
925
  }
868
926
  export declare namespace Network {
869
- type ResponseData = (({
870
- "url": (string);
871
- "protocol": (string);
872
- "status": (JsUint);
873
- "statusText": (string);
874
- "fromCache": (boolean);
875
- "headers": ([
876
- ...((Network.Header)[])
877
- ]);
878
- "mimeType": (string);
879
- "bytesReceived": (JsUint);
880
- "headersSize": (JsUint | null);
881
- "bodySize": (JsUint | null);
882
- "content": (Network.ResponseContent);
883
- "authChallenges"?: ([
884
- ...((Network.AuthChallenge)[])
885
- ]);
886
- }));
927
+ type ResponseData = {
928
+ url: string;
929
+ protocol: string;
930
+ status: JsUint;
931
+ statusText: string;
932
+ fromCache: boolean;
933
+ headers: [...Network.Header[]];
934
+ mimeType: string;
935
+ bytesReceived: JsUint;
936
+ headersSize: JsUint | null;
937
+ bodySize: JsUint | null;
938
+ content: Network.ResponseContent;
939
+ authChallenges?: [...Network.AuthChallenge[]];
940
+ };
887
941
  }
888
942
  export declare namespace Network {
889
- type SetCookieHeader = (({
890
- "name": (string);
891
- "value": (Network.BytesValue);
892
- "domain"?: (string);
893
- "httpOnly"?: (boolean);
894
- "expiry"?: (string);
895
- "maxAge"?: (JsInt);
896
- "path"?: (string);
897
- "sameSite"?: (Network.SameSite);
898
- "secure"?: (boolean);
899
- }));
943
+ type SetCookieHeader = {
944
+ name: string;
945
+ value: Network.BytesValue;
946
+ domain?: string;
947
+ httpOnly?: boolean;
948
+ expiry?: string;
949
+ maxAge?: JsInt;
950
+ path?: string;
951
+ sameSite?: Network.SameSite;
952
+ secure?: boolean;
953
+ };
900
954
  }
901
955
  export declare namespace Network {
902
- type UrlPattern = ((Network.UrlPatternPattern | Network.UrlPatternString));
956
+ type UrlPattern = Network.UrlPatternPattern | Network.UrlPatternString;
903
957
  }
904
958
  export declare namespace Network {
905
- type UrlPatternPattern = (({
906
- "type": ("pattern");
907
- "protocol"?: (string);
908
- "hostname"?: (string);
909
- "port"?: (string);
910
- "pathname"?: (string);
911
- "search"?: (string);
912
- }));
959
+ type UrlPatternPattern = {
960
+ type: 'pattern';
961
+ protocol?: string;
962
+ hostname?: string;
963
+ port?: string;
964
+ pathname?: string;
965
+ search?: string;
966
+ };
913
967
  }
914
968
  export declare namespace Network {
915
- type UrlPatternString = (({
916
- "type": ("string");
917
- "pattern": (string);
918
- }));
969
+ type UrlPatternString = {
970
+ type: 'string';
971
+ pattern: string;
972
+ };
919
973
  }
920
974
  export declare namespace Network {
921
- type AddInterceptParameters = (({
922
- "phases": ([
923
- (Network.InterceptPhase),
924
- ...(Network.InterceptPhase)[]
925
- ]);
926
- "contexts"?: ([
927
- (BrowsingContext.BrowsingContext),
928
- ...(BrowsingContext.BrowsingContext)[]
929
- ]);
930
- "urlPatterns"?: ([
931
- ...((Network.UrlPattern)[])
932
- ]);
933
- }));
975
+ type AddInterceptParameters = {
976
+ phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
977
+ contexts?: [
978
+ BrowsingContext.BrowsingContext,
979
+ ...BrowsingContext.BrowsingContext[],
980
+ ];
981
+ urlPatterns?: [...Network.UrlPattern[]];
982
+ };
934
983
  }
935
984
  export declare namespace Network {
936
- type AddIntercept = ({
937
- "method": ("network.addIntercept");
938
- "params": (Network.AddInterceptParameters);
939
- });
985
+ type AddIntercept = {
986
+ method: 'network.addIntercept';
987
+ params: Network.AddInterceptParameters;
988
+ };
940
989
  }
941
990
  export declare namespace Network {
942
- const enum InterceptPhase {
943
- BeforeRequestSent = "beforeRequestSent",
944
- ResponseStarted = "responseStarted",
945
- AuthRequired = "authRequired"
946
- }
991
+ const enum InterceptPhase {
992
+ BeforeRequestSent = 'beforeRequestSent',
993
+ ResponseStarted = 'responseStarted',
994
+ AuthRequired = 'authRequired',
995
+ }
947
996
  }
948
997
  export declare namespace Network {
949
- type AddInterceptResult = (({
950
- "intercept": (Network.Intercept);
951
- }));
998
+ type AddInterceptResult = {
999
+ intercept: Network.Intercept;
1000
+ };
952
1001
  }
953
1002
  export declare namespace Network {
954
- type ContinueRequest = ({
955
- "method": ("network.continueRequest");
956
- "params": (Network.ContinueRequestParameters);
957
- });
1003
+ type ContinueRequest = {
1004
+ method: 'network.continueRequest';
1005
+ params: Network.ContinueRequestParameters;
1006
+ };
958
1007
  }
959
1008
  export declare namespace Network {
960
- type ContinueRequestParameters = (({
961
- "request": (Network.Request);
962
- "body"?: (Network.BytesValue);
963
- "cookies"?: ([
964
- ...((Network.CookieHeader)[])
965
- ]);
966
- "headers"?: ([
967
- ...((Network.Header)[])
968
- ]);
969
- "method"?: (string);
970
- "url"?: (string);
971
- }));
1009
+ type ContinueRequestParameters = {
1010
+ request: Network.Request;
1011
+ body?: Network.BytesValue;
1012
+ cookies?: [...Network.CookieHeader[]];
1013
+ headers?: [...Network.Header[]];
1014
+ method?: string;
1015
+ url?: string;
1016
+ };
972
1017
  }
973
1018
  export declare namespace Network {
974
- type ContinueResponse = ({
975
- "method": ("network.continueResponse");
976
- "params": (Network.ContinueResponseParameters);
977
- });
1019
+ type ContinueResponse = {
1020
+ method: 'network.continueResponse';
1021
+ params: Network.ContinueResponseParameters;
1022
+ };
978
1023
  }
979
1024
  export declare namespace Network {
980
- type ContinueResponseParameters = (({
981
- "request": (Network.Request);
982
- "cookies"?: ([
983
- ...((Network.SetCookieHeader)[])
984
- ]);
985
- "credentials"?: (Network.AuthCredentials);
986
- "headers"?: ([
987
- ...((Network.Header)[])
988
- ]);
989
- "reasonPhrase"?: (string);
990
- "statusCode"?: (JsUint);
991
- }));
1025
+ type ContinueResponseParameters = {
1026
+ request: Network.Request;
1027
+ cookies?: [...Network.SetCookieHeader[]];
1028
+ credentials?: Network.AuthCredentials;
1029
+ headers?: [...Network.Header[]];
1030
+ reasonPhrase?: string;
1031
+ statusCode?: JsUint;
1032
+ };
992
1033
  }
993
1034
  export declare namespace Network {
994
- type ContinueWithAuth = ({
995
- "method": ("network.continueWithAuth");
996
- "params": (Network.ContinueWithAuthParameters);
997
- });
1035
+ type ContinueWithAuth = {
1036
+ method: 'network.continueWithAuth';
1037
+ params: Network.ContinueWithAuthParameters;
1038
+ };
998
1039
  }
999
1040
  export declare namespace Network {
1000
- type ContinueWithAuthParameters = (({
1001
- "request": (Network.Request);
1002
- } & (Network.ContinueWithAuthCredentials | Network.ContinueWithAuthNoCredentials)));
1041
+ type ContinueWithAuthParameters = {
1042
+ request: Network.Request;
1043
+ } & (
1044
+ | Network.ContinueWithAuthCredentials
1045
+ | Network.ContinueWithAuthNoCredentials
1046
+ );
1003
1047
  }
1004
1048
  export declare namespace Network {
1005
- type ContinueWithAuthCredentials = ({
1006
- "action": ("provideCredentials");
1007
- "credentials": (Network.AuthCredentials);
1008
- });
1049
+ type ContinueWithAuthCredentials = {
1050
+ action: 'provideCredentials';
1051
+ credentials: Network.AuthCredentials;
1052
+ };
1009
1053
  }
1010
1054
  export declare namespace Network {
1011
- type ContinueWithAuthNoCredentials = ({
1012
- "action": ("default" | "cancel");
1013
- });
1055
+ type ContinueWithAuthNoCredentials = {
1056
+ action: 'default' | 'cancel';
1057
+ };
1014
1058
  }
1015
1059
  export declare namespace Network {
1016
- type FailRequest = ({
1017
- "method": ("network.failRequest");
1018
- "params": (Network.FailRequestParameters);
1019
- });
1060
+ type FailRequest = {
1061
+ method: 'network.failRequest';
1062
+ params: Network.FailRequestParameters;
1063
+ };
1020
1064
  }
1021
1065
  export declare namespace Network {
1022
- type FailRequestParameters = (({
1023
- "request": (Network.Request);
1024
- }));
1066
+ type FailRequestParameters = {
1067
+ request: Network.Request;
1068
+ };
1025
1069
  }
1026
1070
  export declare namespace Network {
1027
- type ProvideResponse = ({
1028
- "method": ("network.provideResponse");
1029
- "params": (Network.ProvideResponseParameters);
1030
- });
1071
+ type ProvideResponse = {
1072
+ method: 'network.provideResponse';
1073
+ params: Network.ProvideResponseParameters;
1074
+ };
1031
1075
  }
1032
1076
  export declare namespace Network {
1033
- type ProvideResponseParameters = (({
1034
- "request": (Network.Request);
1035
- "body"?: (Network.BytesValue);
1036
- "cookies"?: ([
1037
- ...((Network.SetCookieHeader)[])
1038
- ]);
1039
- "headers"?: ([
1040
- ...((Network.Header)[])
1041
- ]);
1042
- "reasonPhrase"?: (string);
1043
- "statusCode"?: (JsUint);
1044
- }));
1077
+ type ProvideResponseParameters = {
1078
+ request: Network.Request;
1079
+ body?: Network.BytesValue;
1080
+ cookies?: [...Network.SetCookieHeader[]];
1081
+ headers?: [...Network.Header[]];
1082
+ reasonPhrase?: string;
1083
+ statusCode?: JsUint;
1084
+ };
1045
1085
  }
1046
1086
  export declare namespace Network {
1047
- type RemoveIntercept = ({
1048
- "method": ("network.removeIntercept");
1049
- "params": (Network.RemoveInterceptParameters);
1050
- });
1087
+ type RemoveIntercept = {
1088
+ method: 'network.removeIntercept';
1089
+ params: Network.RemoveInterceptParameters;
1090
+ };
1051
1091
  }
1052
1092
  export declare namespace Network {
1053
- type RemoveInterceptParameters = (({
1054
- "intercept": (Network.Intercept);
1055
- }));
1056
- }
1057
- export type ScriptEvent = (Script.Message | Script.RealmCreated | Script.RealmDestroyed);
1093
+ type RemoveInterceptParameters = {
1094
+ intercept: Network.Intercept;
1095
+ };
1096
+ }
1097
+ export type ScriptEvent =
1098
+ | Script.Message
1099
+ | Script.RealmCreated
1100
+ | Script.RealmDestroyed;
1058
1101
  export declare namespace Network {
1059
- type AuthRequiredParameters = ((Network.BaseParameters & {
1060
- "response": (Network.ResponseData);
1061
- }));
1102
+ type AuthRequiredParameters = Network.BaseParameters & {
1103
+ response: Network.ResponseData;
1104
+ };
1062
1105
  }
1063
1106
  export declare namespace Network {
1064
- type BeforeRequestSentParameters = ((Network.BaseParameters & {
1065
- "initiator": (Network.Initiator);
1066
- }));
1107
+ type BeforeRequestSentParameters = Network.BaseParameters & {
1108
+ initiator: Network.Initiator;
1109
+ };
1067
1110
  }
1068
1111
  export declare namespace Network {
1069
- type FetchErrorParameters = ((Network.BaseParameters & {
1070
- "errorText": (string);
1071
- }));
1112
+ type FetchErrorParameters = Network.BaseParameters & {
1113
+ errorText: string;
1114
+ };
1072
1115
  }
1073
1116
  export declare namespace Network {
1074
- type ResponseCompletedParameters = ((Network.BaseParameters & {
1075
- "response": (Network.ResponseData);
1076
- }));
1117
+ type ResponseCompletedParameters = Network.BaseParameters & {
1118
+ response: Network.ResponseData;
1119
+ };
1077
1120
  }
1078
1121
  export declare namespace Network {
1079
- type ResponseStartedParameters = ((Network.BaseParameters & {
1080
- "response": (Network.ResponseData);
1081
- }));
1082
- }
1083
- export type ScriptCommand = (Script.AddPreloadScript | Script.CallFunction | Script.Disown | Script.Evaluate | Script.GetRealms | Script.RemovePreloadScript);
1084
- export type ScriptResult = ((Script.AddPreloadScriptResult | Script.EvaluateResult | Script.GetRealmsResult));
1122
+ type ResponseStartedParameters = Network.BaseParameters & {
1123
+ response: Network.ResponseData;
1124
+ };
1125
+ }
1126
+ export type ScriptCommand =
1127
+ | Script.AddPreloadScript
1128
+ | Script.CallFunction
1129
+ | Script.Disown
1130
+ | Script.Evaluate
1131
+ | Script.GetRealms
1132
+ | Script.RemovePreloadScript;
1133
+ export type ScriptResult =
1134
+ | Script.AddPreloadScriptResult
1135
+ | Script.EvaluateResult
1136
+ | Script.GetRealmsResult;
1085
1137
  export declare namespace Network {
1086
- type AuthRequired = ({
1087
- "method": ("network.authRequired");
1088
- "params": (Network.AuthRequiredParameters);
1089
- });
1138
+ type AuthRequired = {
1139
+ method: 'network.authRequired';
1140
+ params: Network.AuthRequiredParameters;
1141
+ };
1090
1142
  }
1091
1143
  export declare namespace Network {
1092
- type BeforeRequestSent = ({
1093
- "method": ("network.beforeRequestSent");
1094
- "params": (Network.BeforeRequestSentParameters);
1095
- });
1144
+ type BeforeRequestSent = {
1145
+ method: 'network.beforeRequestSent';
1146
+ params: Network.BeforeRequestSentParameters;
1147
+ };
1096
1148
  }
1097
1149
  export declare namespace Network {
1098
- type FetchError = ({
1099
- "method": ("network.fetchError");
1100
- "params": (Network.FetchErrorParameters);
1101
- });
1150
+ type FetchError = {
1151
+ method: 'network.fetchError';
1152
+ params: Network.FetchErrorParameters;
1153
+ };
1102
1154
  }
1103
1155
  export declare namespace Network {
1104
- type ResponseCompleted = ({
1105
- "method": ("network.responseCompleted");
1106
- "params": (Network.ResponseCompletedParameters);
1107
- });
1156
+ type ResponseCompleted = {
1157
+ method: 'network.responseCompleted';
1158
+ params: Network.ResponseCompletedParameters;
1159
+ };
1108
1160
  }
1109
1161
  export declare namespace Network {
1110
- type ResponseStarted = ({
1111
- "method": ("network.responseStarted");
1112
- "params": (Network.ResponseStartedParameters);
1113
- });
1162
+ type ResponseStarted = {
1163
+ method: 'network.responseStarted';
1164
+ params: Network.ResponseStartedParameters;
1165
+ };
1114
1166
  }
1115
1167
  export declare namespace Script {
1116
- type Channel = (string);
1168
+ type Channel = string;
1117
1169
  }
1118
1170
  export declare namespace Script {
1119
- type EvaluateResultSuccess = (({
1120
- "type": ("success");
1121
- "result": (Script.RemoteValue);
1122
- "realm": (Script.Realm);
1123
- }));
1171
+ type EvaluateResultSuccess = {
1172
+ type: 'success';
1173
+ result: Script.RemoteValue;
1174
+ realm: Script.Realm;
1175
+ };
1124
1176
  }
1125
1177
  export declare namespace Script {
1126
- type ExceptionDetails = (({
1127
- "columnNumber": (JsUint);
1128
- "exception": (Script.RemoteValue);
1129
- "lineNumber": (JsUint);
1130
- "stackTrace": (Script.StackTrace);
1131
- "text": (string);
1132
- }));
1178
+ type ExceptionDetails = {
1179
+ columnNumber: JsUint;
1180
+ exception: Script.RemoteValue;
1181
+ lineNumber: JsUint;
1182
+ stackTrace: Script.StackTrace;
1183
+ text: string;
1184
+ };
1133
1185
  }
1134
1186
  export declare namespace Script {
1135
- type ChannelValue = (({
1136
- "type": ("channel");
1137
- "value": (Script.ChannelProperties);
1138
- }));
1187
+ type ChannelValue = {
1188
+ type: 'channel';
1189
+ value: Script.ChannelProperties;
1190
+ };
1139
1191
  }
1140
1192
  export declare namespace Script {
1141
- type ChannelProperties = (({
1142
- "channel": (Script.Channel);
1143
- "serializationOptions"?: (Script.SerializationOptions);
1144
- "ownership"?: (Script.ResultOwnership);
1145
- }));
1193
+ type ChannelProperties = {
1194
+ channel: Script.Channel;
1195
+ serializationOptions?: Script.SerializationOptions;
1196
+ ownership?: Script.ResultOwnership;
1197
+ };
1146
1198
  }
1147
1199
  export declare namespace Script {
1148
- type EvaluateResult = ((Script.EvaluateResultSuccess | Script.EvaluateResultException));
1200
+ type EvaluateResult =
1201
+ | Script.EvaluateResultSuccess
1202
+ | Script.EvaluateResultException;
1149
1203
  }
1150
1204
  export declare namespace Script {
1151
- type EvaluateResultException = (({
1152
- "type": ("exception");
1153
- "exceptionDetails": (Script.ExceptionDetails);
1154
- "realm": (Script.Realm);
1155
- }));
1205
+ type EvaluateResultException = {
1206
+ type: 'exception';
1207
+ exceptionDetails: Script.ExceptionDetails;
1208
+ realm: Script.Realm;
1209
+ };
1156
1210
  }
1157
1211
  export declare namespace Script {
1158
- type Handle = (string);
1212
+ type Handle = string;
1159
1213
  }
1160
1214
  export declare namespace Script {
1161
- type InternalId = (string);
1215
+ type InternalId = string;
1162
1216
  }
1163
1217
  export declare namespace Script {
1164
- type ListLocalValue = ([
1165
- ...((Script.LocalValue)[])
1166
- ]);
1218
+ type ListLocalValue = [...Script.LocalValue[]];
1167
1219
  }
1168
1220
  export declare namespace Script {
1169
- type LocalValue = ((Script.RemoteReference | Script.PrimitiveProtocolValue | Script.ChannelValue | Script.ArrayLocalValue | Script.DateLocalValue | Script.MapLocalValue | Script.ObjectLocalValue | Script.RegExpLocalValue | Script.SetLocalValue));
1221
+ type LocalValue =
1222
+ | Script.RemoteReference
1223
+ | Script.PrimitiveProtocolValue
1224
+ | Script.ChannelValue
1225
+ | Script.ArrayLocalValue
1226
+ | Script.DateLocalValue
1227
+ | Script.MapLocalValue
1228
+ | Script.ObjectLocalValue
1229
+ | Script.RegExpLocalValue
1230
+ | Script.SetLocalValue;
1170
1231
  }
1171
1232
  export declare namespace Script {
1172
- type ArrayLocalValue = (({
1173
- "type": ("array");
1174
- "value": (Script.ListLocalValue);
1175
- }));
1233
+ type ArrayLocalValue = {
1234
+ type: 'array';
1235
+ value: Script.ListLocalValue;
1236
+ };
1176
1237
  }
1177
1238
  export declare namespace Script {
1178
- type DateLocalValue = (({
1179
- "type": ("date");
1180
- "value": (string);
1181
- }));
1239
+ type DateLocalValue = {
1240
+ type: 'date';
1241
+ value: string;
1242
+ };
1182
1243
  }
1183
1244
  export declare namespace Script {
1184
- type MappingLocalValue = ([
1185
- ...(([
1186
- (Script.LocalValue | string),
1187
- (Script.LocalValue)
1188
- ])[])
1189
- ]);
1245
+ type MappingLocalValue = [
1246
+ ...[Script.LocalValue | string, Script.LocalValue][],
1247
+ ];
1190
1248
  }
1191
1249
  export declare namespace Script {
1192
- type MapLocalValue = (({
1193
- "type": ("map");
1194
- "value": (Script.MappingLocalValue);
1195
- }));
1250
+ type MapLocalValue = {
1251
+ type: 'map';
1252
+ value: Script.MappingLocalValue;
1253
+ };
1196
1254
  }
1197
1255
  export declare namespace Script {
1198
- type ObjectLocalValue = (({
1199
- "type": ("object");
1200
- "value": (Script.MappingLocalValue);
1201
- }));
1256
+ type ObjectLocalValue = {
1257
+ type: 'object';
1258
+ value: Script.MappingLocalValue;
1259
+ };
1202
1260
  }
1203
1261
  export declare namespace Script {
1204
- type RegExpValue = (({
1205
- "pattern": (string);
1206
- "flags"?: (string);
1207
- }));
1262
+ type RegExpValue = {
1263
+ pattern: string;
1264
+ flags?: string;
1265
+ };
1208
1266
  }
1209
1267
  export declare namespace Script {
1210
- type RegExpLocalValue = (({
1211
- "type": ("regexp");
1212
- "value": (Script.RegExpValue);
1213
- }));
1268
+ type RegExpLocalValue = {
1269
+ type: 'regexp';
1270
+ value: Script.RegExpValue;
1271
+ };
1214
1272
  }
1215
1273
  export declare namespace Script {
1216
- type SetLocalValue = (({
1217
- "type": ("set");
1218
- "value": (Script.ListLocalValue);
1219
- }));
1274
+ type SetLocalValue = {
1275
+ type: 'set';
1276
+ value: Script.ListLocalValue;
1277
+ };
1220
1278
  }
1221
1279
  export declare namespace Script {
1222
- type PreloadScript = (string);
1280
+ type PreloadScript = string;
1223
1281
  }
1224
1282
  export declare namespace Script {
1225
- type Realm = (string);
1283
+ type Realm = string;
1226
1284
  }
1227
1285
  export declare namespace Script {
1228
- type PrimitiveProtocolValue = ((Script.UndefinedValue | Script.NullValue | Script.StringValue | Script.NumberValue | Script.BooleanValue | Script.BigIntValue));
1286
+ type PrimitiveProtocolValue =
1287
+ | Script.UndefinedValue
1288
+ | Script.NullValue
1289
+ | Script.StringValue
1290
+ | Script.NumberValue
1291
+ | Script.BooleanValue
1292
+ | Script.BigIntValue;
1229
1293
  }
1230
1294
  export declare namespace Script {
1231
- type UndefinedValue = (({
1232
- "type": ("undefined");
1233
- }));
1295
+ type UndefinedValue = {
1296
+ type: 'undefined';
1297
+ };
1234
1298
  }
1235
1299
  export declare namespace Script {
1236
- type NullValue = (({
1237
- "type": ("null");
1238
- }));
1300
+ type NullValue = {
1301
+ type: 'null';
1302
+ };
1239
1303
  }
1240
1304
  export declare namespace Script {
1241
- type StringValue = (({
1242
- "type": ("string");
1243
- "value": (string);
1244
- }));
1305
+ type StringValue = {
1306
+ type: 'string';
1307
+ value: string;
1308
+ };
1245
1309
  }
1246
1310
  export declare namespace Script {
1247
- type SpecialNumber = ("NaN" | "-0" | "Infinity" | "-Infinity");
1311
+ type SpecialNumber = 'NaN' | '-0' | 'Infinity' | '-Infinity';
1248
1312
  }
1249
1313
  export declare namespace Script {
1250
- type NumberValue = (({
1251
- "type": ("number");
1252
- "value": (number | Script.SpecialNumber);
1253
- }));
1314
+ type NumberValue = {
1315
+ type: 'number';
1316
+ value: number | Script.SpecialNumber;
1317
+ };
1254
1318
  }
1255
1319
  export declare namespace Script {
1256
- type BooleanValue = (({
1257
- "type": ("boolean");
1258
- "value": (boolean);
1259
- }));
1320
+ type BooleanValue = {
1321
+ type: 'boolean';
1322
+ value: boolean;
1323
+ };
1260
1324
  }
1261
1325
  export declare namespace Script {
1262
- type BigIntValue = (({
1263
- "type": ("bigint");
1264
- "value": (string);
1265
- }));
1326
+ type BigIntValue = {
1327
+ type: 'bigint';
1328
+ value: string;
1329
+ };
1266
1330
  }
1267
1331
  export declare namespace Script {
1268
- type RealmInfo = ((Script.WindowRealmInfo | Script.DedicatedWorkerRealmInfo | Script.SharedWorkerRealmInfo | Script.ServiceWorkerRealmInfo | Script.WorkerRealmInfo | Script.PaintWorkletRealmInfo | Script.AudioWorkletRealmInfo | Script.WorkletRealmInfo));
1332
+ type RealmInfo =
1333
+ | Script.WindowRealmInfo
1334
+ | Script.DedicatedWorkerRealmInfo
1335
+ | Script.SharedWorkerRealmInfo
1336
+ | Script.ServiceWorkerRealmInfo
1337
+ | Script.WorkerRealmInfo
1338
+ | Script.PaintWorkletRealmInfo
1339
+ | Script.AudioWorkletRealmInfo
1340
+ | Script.WorkletRealmInfo;
1269
1341
  }
1270
1342
  export declare namespace Script {
1271
- type BaseRealmInfo = ({
1272
- "realm": (Script.Realm);
1273
- "origin": (string);
1274
- });
1343
+ type BaseRealmInfo = {
1344
+ realm: Script.Realm;
1345
+ origin: string;
1346
+ };
1275
1347
  }
1276
1348
  export declare namespace Script {
1277
- type WindowRealmInfo = ((Script.BaseRealmInfo & {
1278
- "type": ("window");
1279
- "context": (BrowsingContext.BrowsingContext);
1280
- "sandbox"?: (string);
1281
- }));
1349
+ type WindowRealmInfo = Script.BaseRealmInfo & {
1350
+ type: 'window';
1351
+ context: BrowsingContext.BrowsingContext;
1352
+ sandbox?: string;
1353
+ };
1282
1354
  }
1283
1355
  export declare namespace Script {
1284
- type DedicatedWorkerRealmInfo = ((Script.BaseRealmInfo & {
1285
- "type": ("dedicated-worker");
1286
- "owners": ([
1287
- (Script.Realm)
1288
- ]);
1289
- }));
1356
+ type DedicatedWorkerRealmInfo = Script.BaseRealmInfo & {
1357
+ type: 'dedicated-worker';
1358
+ owners: [Script.Realm];
1359
+ };
1290
1360
  }
1291
1361
  export declare namespace Script {
1292
- type SharedWorkerRealmInfo = ((Script.BaseRealmInfo & {
1293
- "type": ("shared-worker");
1294
- }));
1362
+ type SharedWorkerRealmInfo = Script.BaseRealmInfo & {
1363
+ type: 'shared-worker';
1364
+ };
1295
1365
  }
1296
1366
  export declare namespace Script {
1297
- type ServiceWorkerRealmInfo = ((Script.BaseRealmInfo & {
1298
- "type": ("service-worker");
1299
- }));
1367
+ type ServiceWorkerRealmInfo = Script.BaseRealmInfo & {
1368
+ type: 'service-worker';
1369
+ };
1300
1370
  }
1301
1371
  export declare namespace Script {
1302
- type WorkerRealmInfo = ((Script.BaseRealmInfo & {
1303
- "type": ("worker");
1304
- }));
1372
+ type WorkerRealmInfo = Script.BaseRealmInfo & {
1373
+ type: 'worker';
1374
+ };
1305
1375
  }
1306
1376
  export declare namespace Script {
1307
- type PaintWorkletRealmInfo = ((Script.BaseRealmInfo & {
1308
- "type": ("paint-worklet");
1309
- }));
1377
+ type PaintWorkletRealmInfo = Script.BaseRealmInfo & {
1378
+ type: 'paint-worklet';
1379
+ };
1310
1380
  }
1311
1381
  export declare namespace Script {
1312
- type AudioWorkletRealmInfo = ((Script.BaseRealmInfo & {
1313
- "type": ("audio-worklet");
1314
- }));
1382
+ type AudioWorkletRealmInfo = Script.BaseRealmInfo & {
1383
+ type: 'audio-worklet';
1384
+ };
1315
1385
  }
1316
1386
  export declare namespace Script {
1317
- type WorkletRealmInfo = ((Script.BaseRealmInfo & {
1318
- "type": ("worklet");
1319
- }));
1387
+ type WorkletRealmInfo = Script.BaseRealmInfo & {
1388
+ type: 'worklet';
1389
+ };
1320
1390
  }
1321
1391
  export declare namespace Script {
1322
- type RealmType = ("window" | "dedicated-worker" | "shared-worker" | "service-worker" | "worker" | "paint-worklet" | "audio-worklet" | "worklet");
1392
+ type RealmType =
1393
+ | 'window'
1394
+ | 'dedicated-worker'
1395
+ | 'shared-worker'
1396
+ | 'service-worker'
1397
+ | 'worker'
1398
+ | 'paint-worklet'
1399
+ | 'audio-worklet'
1400
+ | 'worklet';
1323
1401
  }
1324
1402
  export declare namespace Script {
1325
- type ListRemoteValue = ([
1326
- ...((Script.RemoteValue)[])
1327
- ]);
1403
+ type ListRemoteValue = [...Script.RemoteValue[]];
1328
1404
  }
1329
1405
  export declare namespace Script {
1330
- type MappingRemoteValue = ([
1331
- ...(([
1332
- (Script.RemoteValue | string),
1333
- (Script.RemoteValue)
1334
- ])[])
1335
- ]);
1406
+ type MappingRemoteValue = [
1407
+ ...[Script.RemoteValue | string, Script.RemoteValue][],
1408
+ ];
1336
1409
  }
1337
1410
  export declare namespace Script {
1338
- type RemoteValue = ((Script.PrimitiveProtocolValue | Script.SymbolRemoteValue | Script.ArrayRemoteValue | Script.ObjectRemoteValue | Script.FunctionRemoteValue | Script.RegExpRemoteValue | Script.DateRemoteValue | Script.MapRemoteValue | Script.SetRemoteValue | Script.WeakMapRemoteValue | Script.WeakSetRemoteValue | Script.GeneratorRemoteValue | Script.ErrorRemoteValue | Script.ProxyRemoteValue | Script.PromiseRemoteValue | Script.TypedArrayRemoteValue | Script.ArrayBufferRemoteValue | Script.NodeListRemoteValue | Script.HtmlCollectionRemoteValue | Script.NodeRemoteValue | Script.WindowProxyRemoteValue));
1411
+ type RemoteValue =
1412
+ | Script.PrimitiveProtocolValue
1413
+ | Script.SymbolRemoteValue
1414
+ | Script.ArrayRemoteValue
1415
+ | Script.ObjectRemoteValue
1416
+ | Script.FunctionRemoteValue
1417
+ | Script.RegExpRemoteValue
1418
+ | Script.DateRemoteValue
1419
+ | Script.MapRemoteValue
1420
+ | Script.SetRemoteValue
1421
+ | Script.WeakMapRemoteValue
1422
+ | Script.WeakSetRemoteValue
1423
+ | Script.GeneratorRemoteValue
1424
+ | Script.ErrorRemoteValue
1425
+ | Script.ProxyRemoteValue
1426
+ | Script.PromiseRemoteValue
1427
+ | Script.TypedArrayRemoteValue
1428
+ | Script.ArrayBufferRemoteValue
1429
+ | Script.NodeListRemoteValue
1430
+ | Script.HtmlCollectionRemoteValue
1431
+ | Script.NodeRemoteValue
1432
+ | Script.WindowProxyRemoteValue;
1339
1433
  }
1340
1434
  export declare namespace Script {
1341
- type RemoteReference = ((Script.SharedReference | Script.RemoteObjectReference));
1435
+ type RemoteReference = Script.SharedReference | Script.RemoteObjectReference;
1342
1436
  }
1343
1437
  export declare namespace Script {
1344
- type SharedReference = (({
1345
- "sharedId": (Script.SharedId);
1346
- "handle"?: (Script.Handle);
1347
- } & Extensible));
1438
+ type SharedReference = {
1439
+ sharedId: Script.SharedId;
1440
+ handle?: Script.Handle;
1441
+ } & Extensible;
1348
1442
  }
1349
1443
  export declare namespace Script {
1350
- type RemoteObjectReference = (({
1351
- "handle": (Script.Handle);
1352
- "sharedId"?: (Script.SharedId);
1353
- } & Extensible));
1444
+ type RemoteObjectReference = {
1445
+ handle: Script.Handle;
1446
+ sharedId?: Script.SharedId;
1447
+ } & Extensible;
1354
1448
  }
1355
1449
  export declare namespace Script {
1356
- type SymbolRemoteValue = (({
1357
- "type": ("symbol");
1358
- "handle"?: (Script.Handle);
1359
- "internalId"?: (Script.InternalId);
1360
- }));
1450
+ type SymbolRemoteValue = {
1451
+ type: 'symbol';
1452
+ handle?: Script.Handle;
1453
+ internalId?: Script.InternalId;
1454
+ };
1361
1455
  }
1362
1456
  export declare namespace Script {
1363
- type ArrayRemoteValue = (({
1364
- "type": ("array");
1365
- "handle"?: (Script.Handle);
1366
- "internalId"?: (Script.InternalId);
1367
- "value"?: (Script.ListRemoteValue);
1368
- }));
1457
+ type ArrayRemoteValue = {
1458
+ type: 'array';
1459
+ handle?: Script.Handle;
1460
+ internalId?: Script.InternalId;
1461
+ value?: Script.ListRemoteValue;
1462
+ };
1369
1463
  }
1370
1464
  export declare namespace Script {
1371
- type ObjectRemoteValue = (({
1372
- "type": ("object");
1373
- "handle"?: (Script.Handle);
1374
- "internalId"?: (Script.InternalId);
1375
- "value"?: (Script.MappingRemoteValue);
1376
- }));
1465
+ type ObjectRemoteValue = {
1466
+ type: 'object';
1467
+ handle?: Script.Handle;
1468
+ internalId?: Script.InternalId;
1469
+ value?: Script.MappingRemoteValue;
1470
+ };
1377
1471
  }
1378
1472
  export declare namespace Script {
1379
- type FunctionRemoteValue = (({
1380
- "type": ("function");
1381
- "handle"?: (Script.Handle);
1382
- "internalId"?: (Script.InternalId);
1383
- }));
1473
+ type FunctionRemoteValue = {
1474
+ type: 'function';
1475
+ handle?: Script.Handle;
1476
+ internalId?: Script.InternalId;
1477
+ };
1384
1478
  }
1385
1479
  export declare namespace Script {
1386
- type RegExpRemoteValue = (({
1387
- "handle"?: (Script.Handle);
1388
- "internalId"?: (Script.InternalId);
1389
- }) & Script.RegExpLocalValue);
1480
+ type RegExpRemoteValue = {
1481
+ handle?: Script.Handle;
1482
+ internalId?: Script.InternalId;
1483
+ } & Script.RegExpLocalValue;
1390
1484
  }
1391
1485
  export declare namespace Script {
1392
- type DateRemoteValue = (({
1393
- "handle"?: (Script.Handle);
1394
- "internalId"?: (Script.InternalId);
1395
- }) & Script.DateLocalValue);
1486
+ type DateRemoteValue = {
1487
+ handle?: Script.Handle;
1488
+ internalId?: Script.InternalId;
1489
+ } & Script.DateLocalValue;
1396
1490
  }
1397
1491
  export declare namespace Script {
1398
- type MapRemoteValue = (({
1399
- "type": ("map");
1400
- "handle"?: (Script.Handle);
1401
- "internalId"?: (Script.InternalId);
1402
- "value"?: (Script.MappingRemoteValue);
1403
- }));
1492
+ type MapRemoteValue = {
1493
+ type: 'map';
1494
+ handle?: Script.Handle;
1495
+ internalId?: Script.InternalId;
1496
+ value?: Script.MappingRemoteValue;
1497
+ };
1404
1498
  }
1405
1499
  export declare namespace Script {
1406
- type SetRemoteValue = (({
1407
- "type": ("set");
1408
- "handle"?: (Script.Handle);
1409
- "internalId"?: (Script.InternalId);
1410
- "value"?: (Script.ListRemoteValue);
1411
- }));
1500
+ type SetRemoteValue = {
1501
+ type: 'set';
1502
+ handle?: Script.Handle;
1503
+ internalId?: Script.InternalId;
1504
+ value?: Script.ListRemoteValue;
1505
+ };
1412
1506
  }
1413
1507
  export declare namespace Script {
1414
- type WeakMapRemoteValue = (({
1415
- "type": ("weakmap");
1416
- "handle"?: (Script.Handle);
1417
- "internalId"?: (Script.InternalId);
1418
- }));
1508
+ type WeakMapRemoteValue = {
1509
+ type: 'weakmap';
1510
+ handle?: Script.Handle;
1511
+ internalId?: Script.InternalId;
1512
+ };
1419
1513
  }
1420
1514
  export declare namespace Script {
1421
- type WeakSetRemoteValue = (({
1422
- "type": ("weakset");
1423
- "handle"?: (Script.Handle);
1424
- "internalId"?: (Script.InternalId);
1425
- }));
1515
+ type WeakSetRemoteValue = {
1516
+ type: 'weakset';
1517
+ handle?: Script.Handle;
1518
+ internalId?: Script.InternalId;
1519
+ };
1426
1520
  }
1427
1521
  export declare namespace Script {
1428
- type GeneratorRemoteValue = (({
1429
- "type": ("generator");
1430
- "handle"?: (Script.Handle);
1431
- "internalId"?: (Script.InternalId);
1432
- }));
1522
+ type GeneratorRemoteValue = {
1523
+ type: 'generator';
1524
+ handle?: Script.Handle;
1525
+ internalId?: Script.InternalId;
1526
+ };
1433
1527
  }
1434
1528
  export declare namespace Script {
1435
- type ErrorRemoteValue = (({
1436
- "type": ("error");
1437
- "handle"?: (Script.Handle);
1438
- "internalId"?: (Script.InternalId);
1439
- }));
1529
+ type ErrorRemoteValue = {
1530
+ type: 'error';
1531
+ handle?: Script.Handle;
1532
+ internalId?: Script.InternalId;
1533
+ };
1440
1534
  }
1441
1535
  export declare namespace Script {
1442
- type ProxyRemoteValue = (({
1443
- "type": ("proxy");
1444
- "handle"?: (Script.Handle);
1445
- "internalId"?: (Script.InternalId);
1446
- }));
1536
+ type ProxyRemoteValue = {
1537
+ type: 'proxy';
1538
+ handle?: Script.Handle;
1539
+ internalId?: Script.InternalId;
1540
+ };
1447
1541
  }
1448
1542
  export declare namespace Script {
1449
- type PromiseRemoteValue = (({
1450
- "type": ("promise");
1451
- "handle"?: (Script.Handle);
1452
- "internalId"?: (Script.InternalId);
1453
- }));
1543
+ type PromiseRemoteValue = {
1544
+ type: 'promise';
1545
+ handle?: Script.Handle;
1546
+ internalId?: Script.InternalId;
1547
+ };
1454
1548
  }
1455
1549
  export declare namespace Script {
1456
- type TypedArrayRemoteValue = (({
1457
- "type": ("typedarray");
1458
- "handle"?: (Script.Handle);
1459
- "internalId"?: (Script.InternalId);
1460
- }));
1550
+ type TypedArrayRemoteValue = {
1551
+ type: 'typedarray';
1552
+ handle?: Script.Handle;
1553
+ internalId?: Script.InternalId;
1554
+ };
1461
1555
  }
1462
1556
  export declare namespace Script {
1463
- type ArrayBufferRemoteValue = (({
1464
- "type": ("arraybuffer");
1465
- "handle"?: (Script.Handle);
1466
- "internalId"?: (Script.InternalId);
1467
- }));
1557
+ type ArrayBufferRemoteValue = {
1558
+ type: 'arraybuffer';
1559
+ handle?: Script.Handle;
1560
+ internalId?: Script.InternalId;
1561
+ };
1468
1562
  }
1469
1563
  export declare namespace Script {
1470
- type NodeListRemoteValue = (({
1471
- "type": ("nodelist");
1472
- "handle"?: (Script.Handle);
1473
- "internalId"?: (Script.InternalId);
1474
- "value"?: (Script.ListRemoteValue);
1475
- }));
1564
+ type NodeListRemoteValue = {
1565
+ type: 'nodelist';
1566
+ handle?: Script.Handle;
1567
+ internalId?: Script.InternalId;
1568
+ value?: Script.ListRemoteValue;
1569
+ };
1476
1570
  }
1477
1571
  export declare namespace Script {
1478
- type HtmlCollectionRemoteValue = (({
1479
- "type": ("htmlcollection");
1480
- "handle"?: (Script.Handle);
1481
- "internalId"?: (Script.InternalId);
1482
- "value"?: (Script.ListRemoteValue);
1483
- }));
1572
+ type HtmlCollectionRemoteValue = {
1573
+ type: 'htmlcollection';
1574
+ handle?: Script.Handle;
1575
+ internalId?: Script.InternalId;
1576
+ value?: Script.ListRemoteValue;
1577
+ };
1484
1578
  }
1485
1579
  export declare namespace Script {
1486
- type NodeRemoteValue = (({
1487
- "type": ("node");
1488
- "sharedId"?: (Script.SharedId);
1489
- "handle"?: (Script.Handle);
1490
- "internalId"?: (Script.InternalId);
1491
- "value"?: (Script.NodeProperties);
1492
- }));
1580
+ type NodeRemoteValue = {
1581
+ type: 'node';
1582
+ sharedId?: Script.SharedId;
1583
+ handle?: Script.Handle;
1584
+ internalId?: Script.InternalId;
1585
+ value?: Script.NodeProperties;
1586
+ };
1493
1587
  }
1494
1588
  export declare namespace Script {
1495
- type NodeProperties = (({
1496
- "nodeType": (JsUint);
1497
- "childNodeCount": (JsUint);
1498
- "attributes"?: (({
1499
- [key: string]: (string);
1500
- }));
1501
- "children"?: ([
1502
- ...((Script.NodeRemoteValue)[])
1503
- ]);
1504
- "localName"?: (string);
1505
- "mode"?: ("open" | "closed");
1506
- "namespaceURI"?: (string);
1507
- "nodeValue"?: (string);
1508
- "shadowRoot"?: (Script.NodeRemoteValue | null);
1509
- }));
1589
+ type NodeProperties = {
1590
+ nodeType: JsUint;
1591
+ childNodeCount: JsUint;
1592
+ attributes?: {
1593
+ [key: string]: string;
1594
+ };
1595
+ children?: [...Script.NodeRemoteValue[]];
1596
+ localName?: string;
1597
+ mode?: 'open' | 'closed';
1598
+ namespaceURI?: string;
1599
+ nodeValue?: string;
1600
+ shadowRoot?: Script.NodeRemoteValue | null;
1601
+ };
1510
1602
  }
1511
1603
  export declare namespace Script {
1512
- type WindowProxyRemoteValue = (({
1513
- "type": ("window");
1514
- "value": (Script.WindowProxyProperties);
1515
- "handle"?: (Script.Handle);
1516
- "internalId"?: (Script.InternalId);
1517
- }));
1604
+ type WindowProxyRemoteValue = {
1605
+ type: 'window';
1606
+ value: Script.WindowProxyProperties;
1607
+ handle?: Script.Handle;
1608
+ internalId?: Script.InternalId;
1609
+ };
1518
1610
  }
1519
1611
  export declare namespace Script {
1520
- type WindowProxyProperties = (({
1521
- "context": (BrowsingContext.BrowsingContext);
1522
- }));
1612
+ type WindowProxyProperties = {
1613
+ context: BrowsingContext.BrowsingContext;
1614
+ };
1523
1615
  }
1524
1616
  export declare namespace Script {
1525
- const enum ResultOwnership {
1526
- Root = "root",
1527
- None = "none"
1528
- }
1617
+ const enum ResultOwnership {
1618
+ Root = 'root',
1619
+ None = 'none',
1620
+ }
1529
1621
  }
1530
1622
  export declare namespace Script {
1531
- type SerializationOptions = (({
1532
- /**
1533
- * @defaultValue `0`
1534
- */
1535
- "maxDomDepth"?: ((JsUint | null));
1536
- /**
1537
- * @defaultValue `null`
1538
- */
1539
- "maxObjectDepth"?: ((JsUint | null));
1540
- /**
1541
- * @defaultValue `"none"`
1542
- */
1543
- "includeShadowTree"?: (("none" | "open" | "all"));
1544
- }));
1623
+ type SerializationOptions = {
1624
+ /**
1625
+ * @defaultValue `0`
1626
+ */
1627
+ maxDomDepth?: JsUint | null;
1628
+ /**
1629
+ * @defaultValue `null`
1630
+ */
1631
+ maxObjectDepth?: JsUint | null;
1632
+ /**
1633
+ * @defaultValue `"none"`
1634
+ */
1635
+ includeShadowTree?: 'none' | 'open' | 'all';
1636
+ };
1545
1637
  }
1546
1638
  export declare namespace Script {
1547
- type SharedId = (string);
1639
+ type SharedId = string;
1548
1640
  }
1549
1641
  export declare namespace Script {
1550
- type StackFrame = (({
1551
- "columnNumber": (JsUint);
1552
- "functionName": (string);
1553
- "lineNumber": (JsUint);
1554
- "url": (string);
1555
- }));
1642
+ type StackFrame = {
1643
+ columnNumber: JsUint;
1644
+ functionName: string;
1645
+ lineNumber: JsUint;
1646
+ url: string;
1647
+ };
1556
1648
  }
1557
1649
  export declare namespace Script {
1558
- type StackTrace = (({
1559
- "callFrames": ([
1560
- ...((Script.StackFrame)[])
1561
- ]);
1562
- }));
1563
- }
1650
+ type StackTrace = {
1651
+ callFrames: [...Script.StackFrame[]];
1652
+ };
1653
+ }
1564
1654
  export declare namespace Script {
1565
- type Source = (({
1566
- "realm": (Script.Realm);
1567
- "context"?: (BrowsingContext.BrowsingContext);
1568
- }));
1655
+ type Source = {
1656
+ realm: Script.Realm;
1657
+ context?: BrowsingContext.BrowsingContext;
1658
+ };
1569
1659
  }
1570
1660
  export declare namespace Script {
1571
- type RealmTarget = (({
1572
- "realm": (Script.Realm);
1573
- }));
1661
+ type RealmTarget = {
1662
+ realm: Script.Realm;
1663
+ };
1574
1664
  }
1575
1665
  export declare namespace Script {
1576
- type ContextTarget = (({
1577
- "context": (BrowsingContext.BrowsingContext);
1578
- "sandbox"?: (string);
1579
- }));
1666
+ type ContextTarget = {
1667
+ context: BrowsingContext.BrowsingContext;
1668
+ sandbox?: string;
1669
+ };
1580
1670
  }
1581
1671
  export declare namespace Script {
1582
- type Target = ((Script.ContextTarget | Script.RealmTarget));
1672
+ type Target = Script.ContextTarget | Script.RealmTarget;
1583
1673
  }
1584
1674
  export declare namespace Script {
1585
- type AddPreloadScript = ({
1586
- "method": ("script.addPreloadScript");
1587
- "params": (Script.AddPreloadScriptParameters);
1588
- });
1675
+ type AddPreloadScript = {
1676
+ method: 'script.addPreloadScript';
1677
+ params: Script.AddPreloadScriptParameters;
1678
+ };
1589
1679
  }
1590
1680
  export declare namespace Script {
1591
- type AddPreloadScriptParameters = (({
1592
- "functionDeclaration": (string);
1593
- "arguments"?: ([
1594
- ...((Script.ChannelValue)[])
1595
- ]);
1596
- "contexts"?: ([
1597
- (BrowsingContext.BrowsingContext),
1598
- ...(BrowsingContext.BrowsingContext)[]
1599
- ]);
1600
- "sandbox"?: (string);
1601
- }));
1681
+ type AddPreloadScriptParameters = {
1682
+ functionDeclaration: string;
1683
+ arguments?: [...Script.ChannelValue[]];
1684
+ contexts?: [
1685
+ BrowsingContext.BrowsingContext,
1686
+ ...BrowsingContext.BrowsingContext[],
1687
+ ];
1688
+ sandbox?: string;
1689
+ };
1602
1690
  }
1603
1691
  export declare namespace Script {
1604
- type AddPreloadScriptResult = (({
1605
- "script": (Script.PreloadScript);
1606
- }));
1692
+ type AddPreloadScriptResult = {
1693
+ script: Script.PreloadScript;
1694
+ };
1607
1695
  }
1608
1696
  export declare namespace Script {
1609
- type Disown = ({
1610
- "method": ("script.disown");
1611
- "params": (Script.DisownParameters);
1612
- });
1697
+ type Disown = {
1698
+ method: 'script.disown';
1699
+ params: Script.DisownParameters;
1700
+ };
1613
1701
  }
1614
1702
  export declare namespace Script {
1615
- type DisownParameters = (({
1616
- "handles": ([
1617
- ...((Script.Handle)[])
1618
- ]);
1619
- "target": (Script.Target);
1620
- }));
1703
+ type DisownParameters = {
1704
+ handles: [...Script.Handle[]];
1705
+ target: Script.Target;
1706
+ };
1621
1707
  }
1622
1708
  export declare namespace Script {
1623
- type CallFunctionParameters = (({
1624
- "functionDeclaration": (string);
1625
- "awaitPromise": (boolean);
1626
- "target": (Script.Target);
1627
- "arguments"?: ([
1628
- ...((Script.LocalValue)[])
1629
- ]);
1630
- "resultOwnership"?: (Script.ResultOwnership);
1631
- "serializationOptions"?: (Script.SerializationOptions);
1632
- "this"?: (Script.LocalValue);
1633
- /**
1634
- * @defaultValue `false`
1635
- */
1636
- "userActivation"?: (boolean);
1637
- }));
1709
+ type CallFunctionParameters = {
1710
+ functionDeclaration: string;
1711
+ awaitPromise: boolean;
1712
+ target: Script.Target;
1713
+ arguments?: [...Script.LocalValue[]];
1714
+ resultOwnership?: Script.ResultOwnership;
1715
+ serializationOptions?: Script.SerializationOptions;
1716
+ this?: Script.LocalValue;
1717
+ /**
1718
+ * @defaultValue `false`
1719
+ */
1720
+ userActivation?: boolean;
1721
+ };
1638
1722
  }
1639
1723
  export declare namespace Script {
1640
- type CallFunction = ({
1641
- "method": ("script.callFunction");
1642
- "params": (Script.CallFunctionParameters);
1643
- });
1724
+ type CallFunction = {
1725
+ method: 'script.callFunction';
1726
+ params: Script.CallFunctionParameters;
1727
+ };
1644
1728
  }
1645
1729
  export declare namespace Script {
1646
- type Evaluate = ({
1647
- "method": ("script.evaluate");
1648
- "params": (Script.EvaluateParameters);
1649
- });
1730
+ type Evaluate = {
1731
+ method: 'script.evaluate';
1732
+ params: Script.EvaluateParameters;
1733
+ };
1650
1734
  }
1651
1735
  export declare namespace Script {
1652
- type EvaluateParameters = (({
1653
- "expression": (string);
1654
- "target": (Script.Target);
1655
- "awaitPromise": (boolean);
1656
- "resultOwnership"?: (Script.ResultOwnership);
1657
- "serializationOptions"?: (Script.SerializationOptions);
1658
- /**
1659
- * @defaultValue `false`
1660
- */
1661
- "userActivation"?: (boolean);
1662
- }));
1736
+ type EvaluateParameters = {
1737
+ expression: string;
1738
+ target: Script.Target;
1739
+ awaitPromise: boolean;
1740
+ resultOwnership?: Script.ResultOwnership;
1741
+ serializationOptions?: Script.SerializationOptions;
1742
+ /**
1743
+ * @defaultValue `false`
1744
+ */
1745
+ userActivation?: boolean;
1746
+ };
1663
1747
  }
1664
1748
  export declare namespace Script {
1665
- type GetRealms = ({
1666
- "method": ("script.getRealms");
1667
- "params": (Script.GetRealmsParameters);
1668
- });
1749
+ type GetRealms = {
1750
+ method: 'script.getRealms';
1751
+ params: Script.GetRealmsParameters;
1752
+ };
1669
1753
  }
1670
1754
  export declare namespace Script {
1671
- type GetRealmsParameters = (({
1672
- "context"?: (BrowsingContext.BrowsingContext);
1673
- "type"?: (Script.RealmType);
1674
- }));
1755
+ type GetRealmsParameters = {
1756
+ context?: BrowsingContext.BrowsingContext;
1757
+ type?: Script.RealmType;
1758
+ };
1675
1759
  }
1676
1760
  export declare namespace Script {
1677
- type GetRealmsResult = (({
1678
- "realms": ([
1679
- ...((Script.RealmInfo)[])
1680
- ]);
1681
- }));
1761
+ type GetRealmsResult = {
1762
+ realms: [...Script.RealmInfo[]];
1763
+ };
1682
1764
  }
1683
1765
  export declare namespace Script {
1684
- type RemovePreloadScript = ({
1685
- "method": ("script.removePreloadScript");
1686
- "params": (Script.RemovePreloadScriptParameters);
1687
- });
1766
+ type RemovePreloadScript = {
1767
+ method: 'script.removePreloadScript';
1768
+ params: Script.RemovePreloadScriptParameters;
1769
+ };
1688
1770
  }
1689
1771
  export declare namespace Script {
1690
- type RemovePreloadScriptParameters = (({
1691
- "script": (Script.PreloadScript);
1692
- }));
1772
+ type RemovePreloadScriptParameters = {
1773
+ script: Script.PreloadScript;
1774
+ };
1693
1775
  }
1694
1776
  export declare namespace Script {
1695
- type MessageParameters = (({
1696
- "channel": (Script.Channel);
1697
- "data": (Script.RemoteValue);
1698
- "source": (Script.Source);
1699
- }));
1777
+ type MessageParameters = {
1778
+ channel: Script.Channel;
1779
+ data: Script.RemoteValue;
1780
+ source: Script.Source;
1781
+ };
1700
1782
  }
1701
1783
  export declare namespace Script {
1702
- type RealmCreated = ({
1703
- "method": ("script.realmCreated");
1704
- "params": (Script.RealmInfo);
1705
- });
1784
+ type RealmCreated = {
1785
+ method: 'script.realmCreated';
1786
+ params: Script.RealmInfo;
1787
+ };
1706
1788
  }
1707
1789
  export declare namespace Script {
1708
- type Message = ({
1709
- "method": ("script.message");
1710
- "params": (Script.MessageParameters);
1711
- });
1790
+ type Message = {
1791
+ method: 'script.message';
1792
+ params: Script.MessageParameters;
1793
+ };
1712
1794
  }
1713
1795
  export declare namespace Script {
1714
- type RealmDestroyed = ({
1715
- "method": ("script.realmDestroyed");
1716
- "params": (Script.RealmDestroyedParameters);
1717
- });
1796
+ type RealmDestroyed = {
1797
+ method: 'script.realmDestroyed';
1798
+ params: Script.RealmDestroyedParameters;
1799
+ };
1718
1800
  }
1719
1801
  export declare namespace Script {
1720
- type RealmDestroyedParameters = (({
1721
- "realm": (Script.Realm);
1722
- }));
1802
+ type RealmDestroyedParameters = {
1803
+ realm: Script.Realm;
1804
+ };
1723
1805
  }
1724
- export type StorageCommand = (Storage.DeleteCookies | Storage.GetCookies | Storage.SetCookie);
1725
- export type StorageResult = ((Storage.DeleteCookiesResult | Storage.GetCookiesResult | Storage.SetCookieResult));
1806
+ export type StorageCommand =
1807
+ | Storage.DeleteCookies
1808
+ | Storage.GetCookies
1809
+ | Storage.SetCookie;
1810
+ export type StorageResult =
1811
+ | Storage.DeleteCookiesResult
1812
+ | Storage.GetCookiesResult
1813
+ | Storage.SetCookieResult;
1726
1814
  export declare namespace Storage {
1727
- type PartitionKey = (({
1728
- "userContext"?: (string);
1729
- "sourceOrigin"?: (string);
1730
- } & Extensible));
1815
+ type PartitionKey = {
1816
+ userContext?: string;
1817
+ sourceOrigin?: string;
1818
+ } & Extensible;
1731
1819
  }
1732
1820
  export declare namespace Storage {
1733
- type GetCookies = ({
1734
- "method": ("storage.getCookies");
1735
- "params": (Storage.GetCookiesParameters);
1736
- });
1821
+ type GetCookies = {
1822
+ method: 'storage.getCookies';
1823
+ params: Storage.GetCookiesParameters;
1824
+ };
1737
1825
  }
1738
1826
  export declare namespace Storage {
1739
- type CookieFilter = (({
1740
- "name"?: (string);
1741
- "value"?: (Network.BytesValue);
1742
- "domain"?: (string);
1743
- "path"?: (string);
1744
- "size"?: (JsUint);
1745
- "httpOnly"?: (boolean);
1746
- "secure"?: (boolean);
1747
- "sameSite"?: (Network.SameSite);
1748
- "expiry"?: (JsUint);
1749
- } & Extensible));
1827
+ type CookieFilter = {
1828
+ name?: string;
1829
+ value?: Network.BytesValue;
1830
+ domain?: string;
1831
+ path?: string;
1832
+ size?: JsUint;
1833
+ httpOnly?: boolean;
1834
+ secure?: boolean;
1835
+ sameSite?: Network.SameSite;
1836
+ expiry?: JsUint;
1837
+ } & Extensible;
1750
1838
  }
1751
1839
  export declare namespace Storage {
1752
- type BrowsingContextPartitionDescriptor = (({
1753
- "type": ("context");
1754
- "context": (BrowsingContext.BrowsingContext);
1755
- }));
1840
+ type BrowsingContextPartitionDescriptor = {
1841
+ type: 'context';
1842
+ context: BrowsingContext.BrowsingContext;
1843
+ };
1756
1844
  }
1757
1845
  export declare namespace Storage {
1758
- type StorageKeyPartitionDescriptor = (({
1759
- "type": ("storageKey");
1760
- "userContext"?: (string);
1761
- "sourceOrigin"?: (string);
1762
- } & Extensible));
1846
+ type StorageKeyPartitionDescriptor = {
1847
+ type: 'storageKey';
1848
+ userContext?: string;
1849
+ sourceOrigin?: string;
1850
+ } & Extensible;
1763
1851
  }
1764
1852
  export declare namespace Storage {
1765
- type PartitionDescriptor = ((Storage.BrowsingContextPartitionDescriptor | Storage.StorageKeyPartitionDescriptor));
1853
+ type PartitionDescriptor =
1854
+ | Storage.BrowsingContextPartitionDescriptor
1855
+ | Storage.StorageKeyPartitionDescriptor;
1766
1856
  }
1767
1857
  export declare namespace Storage {
1768
- type GetCookiesParameters = (({
1769
- "filter"?: (Storage.CookieFilter);
1770
- "partition"?: (Storage.PartitionDescriptor);
1771
- }));
1858
+ type GetCookiesParameters = {
1859
+ filter?: Storage.CookieFilter;
1860
+ partition?: Storage.PartitionDescriptor;
1861
+ };
1772
1862
  }
1773
1863
  export declare namespace Storage {
1774
- type GetCookiesResult = (({
1775
- "cookies": ([
1776
- ...((Network.Cookie)[])
1777
- ]);
1778
- "partitionKey": (Storage.PartitionKey);
1779
- }));
1864
+ type GetCookiesResult = {
1865
+ cookies: [...Network.Cookie[]];
1866
+ partitionKey: Storage.PartitionKey;
1867
+ };
1780
1868
  }
1781
1869
  export declare namespace Storage {
1782
- type SetCookie = ({
1783
- "method": ("storage.setCookie");
1784
- "params": (Storage.SetCookieParameters);
1785
- });
1870
+ type SetCookie = {
1871
+ method: 'storage.setCookie';
1872
+ params: Storage.SetCookieParameters;
1873
+ };
1786
1874
  }
1787
1875
  export declare namespace Storage {
1788
- type PartialCookie = (({
1789
- "name": (string);
1790
- "value": (Network.BytesValue);
1791
- "domain": (string);
1792
- "path"?: (string);
1793
- "httpOnly"?: (boolean);
1794
- "secure"?: (boolean);
1795
- "sameSite"?: (Network.SameSite);
1796
- "expiry"?: (JsUint);
1797
- } & Extensible));
1876
+ type PartialCookie = {
1877
+ name: string;
1878
+ value: Network.BytesValue;
1879
+ domain: string;
1880
+ path?: string;
1881
+ httpOnly?: boolean;
1882
+ secure?: boolean;
1883
+ sameSite?: Network.SameSite;
1884
+ expiry?: JsUint;
1885
+ } & Extensible;
1798
1886
  }
1799
1887
  export declare namespace Storage {
1800
- type SetCookieParameters = (({
1801
- "cookie": (Storage.PartialCookie);
1802
- "partition"?: (Storage.PartitionDescriptor);
1803
- }));
1888
+ type SetCookieParameters = {
1889
+ cookie: Storage.PartialCookie;
1890
+ partition?: Storage.PartitionDescriptor;
1891
+ };
1804
1892
  }
1805
1893
  export declare namespace Storage {
1806
- type SetCookieResult = (({
1807
- "partitionKey": (Storage.PartitionKey);
1808
- }));
1894
+ type SetCookieResult = {
1895
+ partitionKey: Storage.PartitionKey;
1896
+ };
1809
1897
  }
1810
1898
  export declare namespace Storage {
1811
- type DeleteCookies = ({
1812
- "method": ("storage.deleteCookies");
1813
- "params": (Storage.DeleteCookiesParameters);
1814
- });
1899
+ type DeleteCookies = {
1900
+ method: 'storage.deleteCookies';
1901
+ params: Storage.DeleteCookiesParameters;
1902
+ };
1815
1903
  }
1816
1904
  export declare namespace Storage {
1817
- type DeleteCookiesParameters = (({
1818
- "filter"?: (Storage.CookieFilter);
1819
- "partition"?: (Storage.PartitionDescriptor);
1820
- }));
1905
+ type DeleteCookiesParameters = {
1906
+ filter?: Storage.CookieFilter;
1907
+ partition?: Storage.PartitionDescriptor;
1908
+ };
1821
1909
  }
1822
1910
  export declare namespace Storage {
1823
- type DeleteCookiesResult = (({
1824
- "partitionKey": (Storage.PartitionKey);
1825
- }));
1911
+ type DeleteCookiesResult = {
1912
+ partitionKey: Storage.PartitionKey;
1913
+ };
1826
1914
  }
1827
- export type LogEvent = (Log.EntryAdded);
1915
+ export type LogEvent = Log.EntryAdded;
1828
1916
  export declare namespace Log {
1829
- const enum Level {
1830
- Debug = "debug",
1831
- Info = "info",
1832
- Warn = "warn",
1833
- Error = "error"
1834
- }
1917
+ const enum Level {
1918
+ Debug = 'debug',
1919
+ Info = 'info',
1920
+ Warn = 'warn',
1921
+ Error = 'error',
1922
+ }
1835
1923
  }
1836
1924
  export declare namespace Log {
1837
- type Entry = ((Log.GenericLogEntry | Log.ConsoleLogEntry | Log.JavascriptLogEntry));
1925
+ type Entry =
1926
+ | Log.GenericLogEntry
1927
+ | Log.ConsoleLogEntry
1928
+ | Log.JavascriptLogEntry;
1838
1929
  }
1839
1930
  export declare namespace Log {
1840
- type BaseLogEntry = ({
1841
- "level": (Log.Level);
1842
- "source": (Script.Source);
1843
- "text": (string | null);
1844
- "timestamp": (JsUint);
1845
- "stackTrace"?: (Script.StackTrace);
1846
- });
1931
+ type BaseLogEntry = {
1932
+ level: Log.Level;
1933
+ source: Script.Source;
1934
+ text: string | null;
1935
+ timestamp: JsUint;
1936
+ stackTrace?: Script.StackTrace;
1937
+ };
1847
1938
  }
1848
1939
  export declare namespace Log {
1849
- type GenericLogEntry = ((Log.BaseLogEntry & {
1850
- "type": (string);
1851
- }));
1940
+ type GenericLogEntry = Log.BaseLogEntry & {
1941
+ type: string;
1942
+ };
1852
1943
  }
1853
1944
  export declare namespace Log {
1854
- type ConsoleLogEntry = ((Log.BaseLogEntry & {
1855
- "type": ("console");
1856
- "method": (string);
1857
- "args": ([
1858
- ...((Script.RemoteValue)[])
1859
- ]);
1860
- }));
1945
+ type ConsoleLogEntry = Log.BaseLogEntry & {
1946
+ type: 'console';
1947
+ method: string;
1948
+ args: [...Script.RemoteValue[]];
1949
+ };
1861
1950
  }
1862
1951
  export declare namespace Log {
1863
- type JavascriptLogEntry = ((Log.BaseLogEntry & {
1864
- "type": ("javascript");
1865
- }));
1952
+ type JavascriptLogEntry = Log.BaseLogEntry & {
1953
+ type: 'javascript';
1954
+ };
1866
1955
  }
1867
1956
  export declare namespace Log {
1868
- type EntryAdded = ({
1869
- "method": ("log.entryAdded");
1870
- "params": (Log.Entry);
1871
- });
1872
- }
1873
- export type InputCommand = (Input.PerformActions | Input.ReleaseActions | Input.SetFiles);
1957
+ type EntryAdded = {
1958
+ method: 'log.entryAdded';
1959
+ params: Log.Entry;
1960
+ };
1961
+ }
1962
+ export type InputCommand =
1963
+ | Input.PerformActions
1964
+ | Input.ReleaseActions
1965
+ | Input.SetFiles;
1874
1966
  export declare namespace Input {
1875
- type ElementOrigin = (({
1876
- "type": ("element");
1877
- "element": (Script.SharedReference);
1878
- }));
1967
+ type ElementOrigin = {
1968
+ type: 'element';
1969
+ element: Script.SharedReference;
1970
+ };
1879
1971
  }
1880
1972
  export declare namespace Input {
1881
- type PerformActionsParameters = (({
1882
- "context": (BrowsingContext.BrowsingContext);
1883
- "actions": ([
1884
- ...((Input.SourceActions)[])
1885
- ]);
1886
- }));
1973
+ type PerformActionsParameters = {
1974
+ context: BrowsingContext.BrowsingContext;
1975
+ actions: [...Input.SourceActions[]];
1976
+ };
1887
1977
  }
1888
1978
  export declare namespace Input {
1889
- type NoneSourceActions = (({
1890
- "type": ("none");
1891
- "id": (string);
1892
- "actions": ([
1893
- ...((Input.NoneSourceAction)[])
1894
- ]);
1895
- }));
1979
+ type NoneSourceActions = {
1980
+ type: 'none';
1981
+ id: string;
1982
+ actions: [...Input.NoneSourceAction[]];
1983
+ };
1896
1984
  }
1897
1985
  export declare namespace Input {
1898
- type KeySourceActions = (({
1899
- "type": ("key");
1900
- "id": (string);
1901
- "actions": ([
1902
- ...((Input.KeySourceAction)[])
1903
- ]);
1904
- }));
1986
+ type KeySourceActions = {
1987
+ type: 'key';
1988
+ id: string;
1989
+ actions: [...Input.KeySourceAction[]];
1990
+ };
1905
1991
  }
1906
1992
  export declare namespace Input {
1907
- type PointerSourceActions = (({
1908
- "type": ("pointer");
1909
- "id": (string);
1910
- "parameters"?: (Input.PointerParameters);
1911
- "actions": ([
1912
- ...((Input.PointerSourceAction)[])
1913
- ]);
1914
- }));
1993
+ type PointerSourceActions = {
1994
+ type: 'pointer';
1995
+ id: string;
1996
+ parameters?: Input.PointerParameters;
1997
+ actions: [...Input.PointerSourceAction[]];
1998
+ };
1915
1999
  }
1916
2000
  export declare namespace Input {
1917
- type PerformActions = ({
1918
- "method": ("input.performActions");
1919
- "params": (Input.PerformActionsParameters);
1920
- });
2001
+ type PerformActions = {
2002
+ method: 'input.performActions';
2003
+ params: Input.PerformActionsParameters;
2004
+ };
1921
2005
  }
1922
2006
  export declare namespace Input {
1923
- type SourceActions = ((Input.NoneSourceActions | Input.KeySourceActions | Input.PointerSourceActions | Input.WheelSourceActions));
2007
+ type SourceActions =
2008
+ | Input.NoneSourceActions
2009
+ | Input.KeySourceActions
2010
+ | Input.PointerSourceActions
2011
+ | Input.WheelSourceActions;
1924
2012
  }
1925
2013
  export declare namespace Input {
1926
- type NoneSourceAction = (Input.PauseAction);
2014
+ type NoneSourceAction = Input.PauseAction;
1927
2015
  }
1928
2016
  export declare namespace Input {
1929
- type KeySourceAction = ((Input.PauseAction | Input.KeyDownAction | Input.KeyUpAction));
2017
+ type KeySourceAction =
2018
+ | Input.PauseAction
2019
+ | Input.KeyDownAction
2020
+ | Input.KeyUpAction;
1930
2021
  }
1931
2022
  export declare namespace Input {
1932
- const enum PointerType {
1933
- Mouse = "mouse",
1934
- Pen = "pen",
1935
- Touch = "touch"
1936
- }
2023
+ const enum PointerType {
2024
+ Mouse = 'mouse',
2025
+ Pen = 'pen',
2026
+ Touch = 'touch',
2027
+ }
1937
2028
  }
1938
2029
  export declare namespace Input {
1939
- type PointerParameters = (({
1940
- /**
1941
- * @defaultValue `"mouse"`
1942
- */
1943
- "pointerType"?: (Input.PointerType);
1944
- }));
2030
+ type PointerParameters = {
2031
+ /**
2032
+ * @defaultValue `"mouse"`
2033
+ */
2034
+ pointerType?: Input.PointerType;
2035
+ };
1945
2036
  }
1946
2037
  export declare namespace Input {
1947
- type WheelSourceActions = (({
1948
- "type": ("wheel");
1949
- "id": (string);
1950
- "actions": ([
1951
- ...((Input.WheelSourceAction)[])
1952
- ]);
1953
- }));
2038
+ type WheelSourceActions = {
2039
+ type: 'wheel';
2040
+ id: string;
2041
+ actions: [...Input.WheelSourceAction[]];
2042
+ };
1954
2043
  }
1955
2044
  export declare namespace Input {
1956
- type PointerSourceAction = ((Input.PauseAction | Input.PointerDownAction | Input.PointerUpAction | Input.PointerMoveAction));
2045
+ type PointerSourceAction =
2046
+ | Input.PauseAction
2047
+ | Input.PointerDownAction
2048
+ | Input.PointerUpAction
2049
+ | Input.PointerMoveAction;
1957
2050
  }
1958
2051
  export declare namespace Input {
1959
- type WheelSourceAction = ((Input.PauseAction | Input.WheelScrollAction));
2052
+ type WheelSourceAction = Input.PauseAction | Input.WheelScrollAction;
1960
2053
  }
1961
2054
  export declare namespace Input {
1962
- type PauseAction = (({
1963
- "type": ("pause");
1964
- "duration"?: (JsUint);
1965
- }));
2055
+ type PauseAction = {
2056
+ type: 'pause';
2057
+ duration?: JsUint;
2058
+ };
1966
2059
  }
1967
2060
  export declare namespace Input {
1968
- type KeyDownAction = (({
1969
- "type": ("keyDown");
1970
- "value": (string);
1971
- }));
2061
+ type KeyDownAction = {
2062
+ type: 'keyDown';
2063
+ value: string;
2064
+ };
1972
2065
  }
1973
2066
  export declare namespace Input {
1974
- type KeyUpAction = (({
1975
- "type": ("keyUp");
1976
- "value": (string);
1977
- }));
2067
+ type KeyUpAction = {
2068
+ type: 'keyUp';
2069
+ value: string;
2070
+ };
1978
2071
  }
1979
2072
  export declare namespace Input {
1980
- type PointerUpAction = (({
1981
- "type": ("pointerUp");
1982
- "button": (JsUint);
1983
- }));
2073
+ type PointerUpAction = {
2074
+ type: 'pointerUp';
2075
+ button: JsUint;
2076
+ };
1984
2077
  }
1985
2078
  export declare namespace Input {
1986
- type PointerDownAction = (({
1987
- "type": ("pointerDown");
1988
- "button": (JsUint);
1989
- } & Input.PointerCommonProperties));
2079
+ type PointerDownAction = {
2080
+ type: 'pointerDown';
2081
+ button: JsUint;
2082
+ } & Input.PointerCommonProperties;
1990
2083
  }
1991
2084
  export declare namespace Input {
1992
- type PointerMoveAction = (({
1993
- "type": ("pointerMove");
1994
- "x": (JsInt);
1995
- "y": (JsInt);
1996
- "duration"?: (JsUint);
1997
- "origin"?: (Input.Origin);
1998
- } & Input.PointerCommonProperties));
2085
+ type PointerMoveAction = {
2086
+ type: 'pointerMove';
2087
+ x: JsInt;
2088
+ y: JsInt;
2089
+ duration?: JsUint;
2090
+ origin?: Input.Origin;
2091
+ } & Input.PointerCommonProperties;
1999
2092
  }
2000
2093
  export declare namespace Input {
2001
- type WheelScrollAction = (({
2002
- "type": ("scroll");
2003
- "x": (JsInt);
2004
- "y": (JsInt);
2005
- "deltaX": (JsInt);
2006
- "deltaY": (JsInt);
2007
- "duration"?: (JsUint);
2008
- /**
2009
- * @defaultValue `"viewport"`
2010
- */
2011
- "origin"?: (Input.Origin);
2012
- }));
2094
+ type WheelScrollAction = {
2095
+ type: 'scroll';
2096
+ x: JsInt;
2097
+ y: JsInt;
2098
+ deltaX: JsInt;
2099
+ deltaY: JsInt;
2100
+ duration?: JsUint;
2101
+ /**
2102
+ * @defaultValue `"viewport"`
2103
+ */
2104
+ origin?: Input.Origin;
2105
+ };
2013
2106
  }
2014
2107
  export declare namespace Input {
2015
- type PointerCommonProperties = ({
2016
- /**
2017
- * @defaultValue `1`
2018
- */
2019
- "width"?: (JsUint);
2020
- /**
2021
- * @defaultValue `1`
2022
- */
2023
- "height"?: (JsUint);
2024
- /**
2025
- * @defaultValue `0`
2026
- */
2027
- "pressure"?: (number);
2028
- /**
2029
- * @defaultValue `0`
2030
- */
2031
- "tangentialPressure"?: (number);
2032
- /**
2033
- * Must be between `0` and `359`, inclusive.
2034
- *
2035
- * @defaultValue `0`
2036
- */
2037
- "twist"?: ((number));
2038
- /**
2039
- * Must be between `0` and `1.5707963267948966`, inclusive.
2040
- *
2041
- * @defaultValue `0`
2042
- */
2043
- "altitudeAngle"?: ((number));
2044
- /**
2045
- * Must be between `0` and `6.283185307179586`, inclusive.
2046
- *
2047
- * @defaultValue `0`
2048
- */
2049
- "azimuthAngle"?: ((number));
2050
- });
2108
+ type PointerCommonProperties = {
2109
+ /**
2110
+ * @defaultValue `1`
2111
+ */
2112
+ width?: JsUint;
2113
+ /**
2114
+ * @defaultValue `1`
2115
+ */
2116
+ height?: JsUint;
2117
+ /**
2118
+ * @defaultValue `0`
2119
+ */
2120
+ pressure?: number;
2121
+ /**
2122
+ * @defaultValue `0`
2123
+ */
2124
+ tangentialPressure?: number;
2125
+ /**
2126
+ * Must be between `0` and `359`, inclusive.
2127
+ *
2128
+ * @defaultValue `0`
2129
+ */
2130
+ twist?: number;
2131
+ /**
2132
+ * Must be between `0` and `1.5707963267948966`, inclusive.
2133
+ *
2134
+ * @defaultValue `0`
2135
+ */
2136
+ altitudeAngle?: number;
2137
+ /**
2138
+ * Must be between `0` and `6.283185307179586`, inclusive.
2139
+ *
2140
+ * @defaultValue `0`
2141
+ */
2142
+ azimuthAngle?: number;
2143
+ };
2051
2144
  }
2052
2145
  export declare namespace Input {
2053
- type Origin = ("viewport" | "pointer" | Input.ElementOrigin);
2146
+ type Origin = 'viewport' | 'pointer' | Input.ElementOrigin;
2054
2147
  }
2055
2148
  export declare namespace Input {
2056
- type ReleaseActions = ({
2057
- "method": ("input.releaseActions");
2058
- "params": (Input.ReleaseActionsParameters);
2059
- });
2149
+ type ReleaseActions = {
2150
+ method: 'input.releaseActions';
2151
+ params: Input.ReleaseActionsParameters;
2152
+ };
2060
2153
  }
2061
2154
  export declare namespace Input {
2062
- type ReleaseActionsParameters = (({
2063
- "context": (BrowsingContext.BrowsingContext);
2064
- }));
2155
+ type ReleaseActionsParameters = {
2156
+ context: BrowsingContext.BrowsingContext;
2157
+ };
2065
2158
  }
2066
2159
  export declare namespace Input {
2067
- type SetFiles = ({
2068
- "method": ("input.setFiles");
2069
- "params": (Input.SetFilesParameters);
2070
- });
2160
+ type SetFiles = {
2161
+ method: 'input.setFiles';
2162
+ params: Input.SetFilesParameters;
2163
+ };
2071
2164
  }
2072
2165
  export declare namespace Input {
2073
- type SetFilesParameters = (({
2074
- "context": (BrowsingContext.BrowsingContext);
2075
- "element": (Script.SharedReference);
2076
- "files": ([
2077
- ...((string)[])
2078
- ]);
2079
- }));
2166
+ type SetFilesParameters = {
2167
+ context: BrowsingContext.BrowsingContext;
2168
+ element: Script.SharedReference;
2169
+ files: [...string[]];
2170
+ };
2080
2171
  }