Replies: 2 comments 1 reply
-
|
Hi @torbenj! The correct file extension for non-js file typings is indeed
|
Beta Was this translation helpful? Give feedback.
-
|
Hi, There's a tool that can generate the json file, it would be awesome if you could include it in the lib, so the dev doesn't have to build it on their own. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I always had the issue that onyx type definitions aren't recognized by IntelliJ-based IDEs.
After some research I came to the solution that the issue is how the type definition files are named.
In
packages/sit-onyx/vite.config.tsevery.vue.d.tsfile extension gets changed tod.vue.tsfor some reasonI removed the lines from my local clone, built the npm package and used it in separate demo project, now I get much better autocompletion in Webstorm than with the standard onyx build which is very nice to see.
Before (OnyxCard seems to be cached somewhere from previous tests, no other components get suggested):

After (all components get suggested including props):

Is there a specific reason why you need to rename these files and if not, would it be possible to remove the renaming to get better autocompletion for everyone using onyx?
It seems that VSCode accepts both versions, so at least in my limited tests it doesn't break VSCode compatibility.
Beta Was this translation helpful? Give feedback.
All reactions