Okay, I ran into the same issue today on Windows 10.
I’ve uninstalled VSC, deleted .platformio and .vscode from my user directory. I deleted .vscode and .pio from my project directory. I’ve reinstalled VSC x64 1.40.2 (System setup). Reinstalled PlatformIO, opened my project folder in VSC and… still got the isse
I’ve then installed VSC on an other Windows 10 PC, copied my project, installed PIO and the tasks worked fine.
I may have also clicked the disable typescript button…
How do I solve the issue? Downgrading is not an option…