Im working on several large projects usingvisual studio code, react, typescript, node, webpack etc.. that are unrelated but all have the same issue
For some components that use common types, I extract them into a type.ts file or interface.ts so I can import them to multiple components.
Problem:
I have an interesting issue where anytime I update these types or interfaces (such as changing a string type to number, adding, deleting or any type of update) my compiler does not pick up the changes and throws errors when I try to use the updated type or interface
Only solution I currently have:
- Save file & Close vsc (fully quit - reload does not work)
- Run npm start again (after doing this, the new changes are picked up
Does anyone know a better solution to this?
Such as a way to tell node to watch and apply changes in these files or some way to do the same with typescript compiler or?