hookstate icon indicating copy to clipboard operation
hookstate copied to clipboard

Creating a global object using hookstate, but unable to find the property when using it.

Open 1437496027 opened this issue 2 years ago • 2 comments

image

image

1437496027 avatar Jun 28 '23 06:06 1437496027

please try restarting your TS server. If it does not help, I need a reproducer

avkonst avatar Jun 28 '23 07:06 avkonst

please try restarting your TS server. If it does not help, I need a reproducer

It's just that there is no type hinting in TS, but it doesn't affect the usage.

I want to achieve the effect of TypeScript type hinting. I tried it, and if I add type checking for basic types like number and boolean, it works fine. However, when the type is an object or 'any', it prompts that the property does not exist on type 'State<IData, {}>'.

1437496027 avatar Jun 28 '23 08:06 1437496027