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

Improve typing of manifest config #521

Open
aklinker1 opened this issue Mar 3, 2024 · 3 comments
Open

Improve typing of manifest config #521

aklinker1 opened this issue Mar 3, 2024 · 3 comments
Labels
Milestone

Comments

@aklinker1
Copy link
Collaborator

Feature Request

Instead of using webextension-polyfill's Manifest.WebExtensionManifest type, implement our own that works for both Chrome and firefox, as well as MV2 and MV3.

Is your feature request related to a bug?

N/A

What are the alternatives?

TS ignoring things everywhere.

Additional context

Realized the types weren't good enough in #518

@aklinker1 aklinker1 added this to the v1.0 milestone Mar 3, 2024
@pavitra-infocusp
Copy link

Missing manifest.key property type on wxt.config.ts. It works though.

Object literal may only specify known properties, and 'key' does not exist in type 'Partial<Omit<WebExtensionManifest, "background" | "chrome_url_overrides" | "devtools_page" | "manifest_version" | "options_page" | "options_ui" | "sandbox">> | Promise<...> | UserManifestFn'.ts(2353)
index-l43sonfW.d.ts(227, 5): The expected type comes from property 'manifest' which is declared here on type 'UserConfig'
(property) key: string

@trinhcanhphuc
Copy link

any solution for this issue ? :(

@aklinker1
Copy link
Collaborator Author

aklinker1 commented Mar 8, 2024

Writing 1000 lines of types takes time. Its a WIP

Just use // @ts-expect-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants