wasp
wasp copied to clipboard
Ensure "user" tsconfig.json files exists and is correct
To provide proper IDE support (go to definition, type signatures, etc.), Wasp currently generates a "dummy" tsconfig.json
file and places it inside the directories with user code (i.e., src/{server,shared,client}
). This happens during project creation. Check the docs for more info.
What if the user has since (by accident or malicious intent) deleted the tsconfig.json
file. Should Wasp detect this and regenerate it?
Old versions aren't a problem, as we've given them a detailed migration guide that solves this problem.
Ot what if they modified them?
I would call this "should Wasp manage tsconfig.json files"? And I think the answer is yes. It should check if they are there, if they are not generate them, and if they are there but something is wrong with them, fix them -> it might just go for it, or warn user about something, ... . Maybe some parts of tsconfig are managed by user, and some parts are by Wasp.
Wasp 0.12.0 shifted the goals for this issue (i.e., we no longer have different files for configuring TS on client and server), but the rest is still relevant.
Related to #2169