How to add global types for web components #9980
Unanswered
KonnorRogers
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there! I work on https://shoelace.style and we recently received a PR for generating global types for Vue.
The proposed PR does the following in the
tsconfig.json
:However, it's my understanding this may affect other
@types
and in a project. I noticed there was aenv.d.ts
generated with new Vue projects and I think something like the following would work:I was mostly curious what the best way is to add globally registering web component types that exist in a single
.d.ts
file.I tried searching the documentation but couldn't find any examples of anything. This is the closest I found:
https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties
Full context:
shoelace-style/shoelace#1797
Beta Was this translation helpful? Give feedback.
All reactions