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

declarativeContent doesn't have a Typescript type defined #660

Closed
kevincam3 opened this issue May 19, 2024 · 4 comments
Closed

declarativeContent doesn't have a Typescript type defined #660

kevincam3 opened this issue May 19, 2024 · 4 comments
Labels
bug Something isn't working upstream Issue related to an upstream library

Comments

@kevincam3
Copy link

Describe the bug

When trying to use browser.declarativeContent my IDE (PhpStorm) displays it in red to signal that it's not recognized.

A clear and concise description of what the bug is.
Same as above

To Reproduce

type: browser.declarativeContent in your IDE

Share minimal reproduction. Examples of a minimal reproduction:
image

@kevincam3 kevincam3 added the pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug label May 19, 2024
@aklinker1
Copy link
Collaborator

aklinker1 commented May 21, 2024

Types are provided by webextension-polyfill-ts. I've attempted to reach out and ask if I could help maintain and release changes, but didn't get a response... I would like to update the types since chrome has been adding more APIs with MV3, but an update to these types haven't been reelased in 6 months.

Maybe it's time to move on from the polyfill and use chrome and https://www.npmjs.com/package/@types/chrome instead... Not sure if these types support cross-platform APIs, but the types are constantly getting updated. But IMO the polyfill is still necessary, so I'm hesitant to switch from it.

@aklinker1 aklinker1 added bug Something isn't working upstream Issue related to an upstream library and removed pending-triage Someone (usually a maintainer) needs to look into this to see if it's a bug labels May 21, 2024
@kevincam3
Copy link
Author

It looks like they claim that these types are auto generateed. So I submitted an issue about this over there as well. Maybe somebody will up date it.

@aklinker1
Copy link
Collaborator

🤞 Thanks!

@aklinker1
Copy link
Collaborator

aklinker1 commented Jul 27, 2024

Just released an experiment feature in [email protected] to switch to @types/chrome, which has this type in it. Try it out and let me know how it goes: #868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue related to an upstream library
Projects
None yet
Development

No branches or pull requests

2 participants