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

Add @types to DefinitelyTyped #310

Open
kkmuffme opened this issue Jan 28, 2023 · 2 comments
Open

Add @types to DefinitelyTyped #310

kkmuffme opened this issue Jan 28, 2023 · 2 comments

Comments

@kkmuffme
Copy link

Would be great if the types could be added to https://github.com/DefinitelyTyped/DefinitelyTyped

@brendankenny
Copy link
Member

web-vitals ships with its own types so doesn't need an entry in Definitely Typed. Are the types not working for you?

@kkmuffme
Copy link
Author

They don't work when using the IIFE (e.g. via https://unpkg.com/web-vitals@3.1.1/dist/web-vitals.iife.js) since var webVitals is reported as {}
This is due to the .d.ts being a module (export/import in the .d.ts), therefore only window.webVitals works as expected but using just the webVitals variable reports an error.

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

No branches or pull requests

2 participants