WEBcoast Logo

PhpStorm: JavaScript code completion not working correctly

Those who work a lot with TYPO3 and probably work a lot with TypoScript may also have the file extension *.ts assigned to the TypoScript file type. Those wo also do frontend development, meaning writing JavaScript, may have noticed, that the JavaScript completion does not work very well or not at all. The suggestion for the default JavaScript funktions and the DOM do not appear.

As I found out today, the changed file type mapping is causing this. As soon as I change *.ts back to TypeScript the code completion goes back to normal. For TypoScript you have to use *.t3s or *.typoscript instead.

Those who still want to use *.ts for TypoScript files can assign *.d.ts to the TypeScript file type. The files used for completion are so called type definitions, that have *.d.ts as file extension.

I initially opened a bug report for PhpStorm and shared my finding in the issue: https://youtrack.jetbrains.com/issue/WEB-34427