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

InteliSense stopped picking up generated types after upgrade from 1.0.12 to 13 #22

Closed
yep-dev opened this issue Aug 25, 2023 · 9 comments

Comments

@yep-dev
Copy link

yep-dev commented Aug 25, 2023

Changing versions back and forth, .13 stops displaying completions for me, it works in .12. New version still errors when the invalid entity is passed, it's just the completion that stopped showing up. I'm working in PyCharm – basically WebStorm with Python support.
Tried invalidating caches, changing configuration, but it seems to be because of the library
Maybe you know something that might have caused it.

@shannonhochkins
Copy link
Owner

I do test thoroughly before I deploy, sometimes it's easy to miss things, when you create an issue can you please be a bit more detailed? What does your tsconfig look like? Does your generated type file have everything inside it? Have you tried restarting the ts server? Restarting vscode?

@shannonhochkins
Copy link
Owner

I have setup types correctly for lights / climates, but that's it currently - in the home assistant gihub repository, they have custom types for each entity type by domain, eg here: https://github.com/home-assistant/frontend/blob/155e9d9e95a85a3bb555f238fadd2c00ca7d3d69/src/data/alarm_control_panel.ts#L27

I have looked at potentially scraping and pulling theese from the github repository, however haven't found a nice solution for this yet as they're not named consistently, but i will do some further digging

@yep-dev
Copy link
Author

yep-dev commented Aug 26, 2023

Okay then, if it works all well for you. If someone has the same issue, I found a workaround – copying the generated entity names into the index.d.ts file in linked local @hakit/core
Works good enough, I won't burden you with that then as we have different IDEs, and debugging types linking being now in new (better, but somehow not liked by JetBrains IDE) format you upgraded to is pain

@yep-dev yep-dev closed this as completed Aug 26, 2023
@shannonhochkins
Copy link
Owner

It still may help to see your setup yo enderatand what night be causing you to have issues mate!

@yep-dev
Copy link
Author

yep-dev commented Aug 26, 2023

sure, you can see my setup here https://github.com/yep-dev/ha-react-dashboard
so again, the only change I was doing was changing the @hakit/core version and installing it back and forth that caused it to lose those completions, but that could be because my setup or IDE can't accommodate the changes

@shannonhochkins
Copy link
Owner

I will check this out a little later and see if I can spot anything!

@shannonhochkins
Copy link
Owner

you mentioned:

format you upgraded to is pain

Why is it a pain?

I setup a completely new fresh test and it's all working with intellisense, I don't believe there's anything wrong with the types, I also checked out your repo and ran the type sync and intellisense and type validation is working fine so I'd say it is something to do with your IDE, bit hard to replicate unfortunately

@yep-dev
Copy link
Author

yep-dev commented Aug 27, 2023

debugging types linking being now in new (better, but somehow not liked by JetBrains IDE) format you upgraded to is pain

I meant that debugging [stuff not liked by my IDE] (that just happens to be the new format) is pain

@shannonhochkins
Copy link
Owner

the mian difference i can see, is that at the bottom of the old types, there was a large export list re-exporting every type, the only thing i can think of is that for some reason your IDE isnt picking uop the types because of this, but i dont think so...

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