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

feat: Implement tabs.update #68

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

charlie632
Copy link
Contributor

Add an in-memory implementation of tab.update.

feat: add tabs update

feat: add tabs update
@charlie632 charlie632 force-pushed the feat/add-tabs-update branch from 2ba35c8 to 59b1dc9 Compare August 20, 2024 03:43
Comment on lines +159 to +163
// @ts-expect-error the type expects an overload
async update(
tabIdOrUpdateInfo: number | undefined | Tabs.UpdateUpdatePropertiesType,
optionalUpdateInfo: Tabs.UpdateUpdatePropertiesType | never,
) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: TS was complaining here. There is an overload https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/update#syntax, as you can pass one or two parameters. I opted to add the type annotation for all of the possible combinations.

Copy link
Owner

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Looks like I'm missing tests for the tabs API... Not sure why lol. So lets get this merged!

@aklinker1 aklinker1 changed the title feat: add tabs update feat: Implemente tabs.update Aug 26, 2024
@aklinker1 aklinker1 changed the title feat: Implemente tabs.update feat: Implement tabs.update Aug 26, 2024
@aklinker1 aklinker1 merged commit 2bc4d7c into aklinker1:main Aug 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants