Repository navigation
reload d.ts modules in runtime #1963
Replies: 1 comment 2 replies
|
A For a normal ts-node development process, restart the process after changing declarations so it creates a fresh compiler service. Deleting a Node module cache entry is not a compiler-service reset. I checked this with ts-node 10.9.2 / TypeScript 5.9.3: an entry point loaded a global declaration using Restarting your editor's language server only refreshes that editor's diagnostics. It does not restart the separate ts-node process running your server. See how ts-node works and watching/restarting. |
Uh oh!
There was an error while loading. Please reload this page.
wih node you can (while the server is still running)
do
delete require.cache[modulepath] require(modulepath)to completely reload a module from the disk
but i didnt find any way to "unload" a .d.ts file 🤔maybe its also enough to restart the kanguage server if thats possible idk about the internals
All reactions