-
Notifications
You must be signed in to change notification settings - Fork 251
chore(deps): update leafygreen to latest #7775
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mabaasit fix looks good, but you can make the code better by avoiding unnecessary explicit type assertions
| const role = (await messageElement.getAttribute('data-role')) as | ||
| | 'user' | ||
| | 'assistant'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of asserting types, you can add an actual check, which will not only satisfy typescript, but also will make sure that if this breaks, the error points out better what exactly broke
| const role = (await messageElement.getAttribute('data-role')) as | |
| | 'user' | |
| | 'assistant'; | |
| const role = await messageElement.getAttribute('data-role') | |
| if (role !== 'user' && role !== 'assistant') { | |
| throw new Error(`Expected data-role to be user | assistant, got ${role}`); | |
| } |
…compass into ci/update-leafygreen
This PR is automatically generated and updates the versions of the dependency group leafygreen to latest version.
If CI is green on this patch you should feel free to merge it at your convenience.
If CI is red and you think that failures are related to the version updates, you should raise an issue, so that it can be manually resolved and we can continue to update the package group to latest.