Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(new): migrate ConsoleMessage docs to TSDoc #6065

Merged
merged 1 commit into from Jun 22, 2020
Merged

Conversation

paullewis
Copy link
Contributor

No description provided.

@paullewis
Copy link
Contributor Author

Includes a fix on the console message type to be more restrictive than just string, since according to the current docs there's a fixed number of types it can be.

export type ConsoleMessageType = 'log' | 'debug' | 'info' | 'error' | 'warning' |
'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' |
'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' |
'profileEnd' | 'count' | 'timeEnd' | 'verbose';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this type already exist in src/protocol.d.ts ? If so could we import it to avoid the duplication? It might not (there's ongoing work to get us onto the devtools-protocol npm package) and in that case this is fine

Copy link
Contributor Author

@paullewis paullewis Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out no. While there is something similar in the protocol, because it's autogenerated we can't get at the values.

columnNumber?: number;
}

// Prettier seems to struggle with the ConsoleMessageType declaration
// so it is switched off just for that block.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I don't know. As per our offline conversation, it seems unhappy in the context of the file itself. Maybe a version difference?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah maybe! Let's leave this be for now. Not worth blocking.

Copy link
Collaborator

@jackfranklin jackfranklin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits :)

@paullewis paullewis merged commit 819afbe into main Jun 22, 2020
@mathiasbynens mathiasbynens deleted the consolemessage-tsdoc branch June 30, 2020 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants