double-vue
double-vue copied to clipboard
double.d.ts isn't updated after remove files
If I remove some files, double.d.ts
still contains data of a removed file
Thanks for reporting this! Due to how double works internally, this is not trivial to fix, because we only ever get events for when a file is imported, but we don't get notifications when files are removed. We might be able to hook into vite's / webpack's file watcher to get events for deleted files though...
Edit: This wouldn't take care of files that are deleted while the bundler isn't running though. Maybe we need some kind of "cleanup" process that runs when the bundler is started as well.
I think you could clear the whole file if a server is starting. Then, you'd be sure that file contains the current state
That doesn't actually do it, because vite only gets called if you actually import a file, and for most projects, the different pages are lazy loaded, so you would then only get types after you've opened the respective page in the browser. It would have to be a cleanup process which only removes the types where the file doesn't exist anymore.