Webstorm React Hinting For Type Enums

In our React Typescript project, we are using enums that look like this:

type message = 'info' | 'warning' | 'error';

I've noticed that while the type is checked, I don't see hints for the individual string options of these enums. An example would be when I am writing something like:

<String type="message. 

I would like all the options to appear in a menu after I write the dot. Is it possible?

Thanks!

0
1 comment

Please can you provide a complete code snippet? message is a union type alias here, but you are trying to use it as a property value?

0

Please sign in to leave a comment.