-
-
Notifications
You must be signed in to change notification settings - Fork 484
Description
Hi,
The first question, how to declare for .vue files only I could probably solve with some bash hacking (simply delete whatever is changed in git and isn't *.vue.d.ts) but I can't figure out how to merge all the declaration files into one. Tried to RTFM but neither --outDir nor --outFile worked for me.
Actually, checked StackOverflow and saw this
To map a .d.ts file to its javascript file you need to give the .d.ts file the same name as the javascript file, keep them in the same folder, and point the code that needs it to the .d.ts file.
So its possible that everything is working as designed. They're basically header like files. But I'll ask the question anyway so you can confirm and others wondering the same will be able to find it here
But it would be nice if you could process .vue files only and overwrite existing .d.ts files. Because the script I'm currently thinking of will be something along the lines of
find -name '*.vue.d.ts' | xargs rm || true
npx vue-tsc --declaration --emitDeclarationOnly
git ls-files --others --exclude-standard | grep -v vue | grep .d.ts | xargs rm || true
which is.... ok :)