fix(types): update ConsoleMessage.type in protocol.yml and docs

Co-authored-by: yury-s <9798949+yury-s@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-05-23 18:13:07 +00:00
parent fe993b8063
commit 569e3d0714
5 changed files with 38 additions and 6 deletions

View File

@ -139,7 +139,17 @@ The text of the console message.
## method: ConsoleMessage.type ## method: ConsoleMessage.type
* since: v1.8 * since: v1.8
- returns: <[string]<"log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"timeEnd">> * langs: js
- returns: <[ConsoleMessageType]>
One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
`'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`,
`'count'`, `'timeEnd'`.
## method: ConsoleMessage.type
* since: v1.8
* langs: csharp, java, python
- returns: <[string]>
One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`, One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
`'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`, `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`,

View File

@ -18838,7 +18838,7 @@ export interface ConsoleMessage {
* `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, * `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`,
* `'profileEnd'`, `'count'`, `'timeEnd'`. * `'profileEnd'`, `'count'`, `'timeEnd'`.
*/ */
type(): "log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"timeEnd"; type(): ConsoleMessageType;
} }
/** /**

View File

@ -39,8 +39,8 @@ export class ConsoleMessage implements api.ConsoleMessage {
return this._page; return this._page;
} }
type(): 'log'|'debug'|'info'|'error'|'warning'|'dir'|'dirxml'|'table'|'trace'|'clear'|'startGroup'|'startGroupCollapsed'|'endGroup'|'assert'|'profile'|'profileEnd'|'count'|'timeEnd' { type(): ReturnType<api.ConsoleMessage["type"]> {
return this._event.type as 'log'|'debug'|'info'|'error'|'warning'|'dir'|'dirxml'|'table'|'trace'|'clear'|'startGroup'|'startGroupCollapsed'|'endGroup'|'assert'|'profile'|'profileEnd'|'count'|'timeEnd'; return this._event.type as ReturnType<api.ConsoleMessage["type"]>;
} }
text(): string { text(): string {

View File

@ -18838,7 +18838,7 @@ export interface ConsoleMessage {
* `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, * `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`,
* `'profileEnd'`, `'count'`, `'timeEnd'`. * `'profileEnd'`, `'count'`, `'timeEnd'`.
*/ */
type(): "log"|"debug"|"info"|"error"|"warning"|"dir"|"dirxml"|"table"|"trace"|"clear"|"startGroup"|"startGroupCollapsed"|"endGroup"|"assert"|"profile"|"profileEnd"|"count"|"timeEnd"; type(): ConsoleMessageType;
} }
/** /**

View File

@ -1147,10 +1147,32 @@ Browser:
close: close:
ConsoleMessageType:
type: enum
literals:
- log
- debug
- info
- error
- warning
- dir
- dirxml
- table
- trace
- clear
- startGroup
- startGroupCollapsed
- endGroup
- assert
- profile
- profileEnd
- count
- timeEnd
ConsoleMessage: ConsoleMessage:
type: mixin type: mixin
properties: properties:
type: string type: ConsoleMessageType
text: string text: string
args: args:
type: array type: array