Typescript: unexpected reserved word in PHPStorm

ぃ、小莉子 提交于 2019-12-11 14:04:16

问题


I´m trying to get a simple TypeScript file working in PHPStorm, but sadly there seem to be some misconfiguration by default as the class keyword is not recognized properly

This is my TypeScript file:

class Test{

}

And this is the error I´m facing:

And this is my FieWatcher configuration of TypeScript

How can I get TypeScript working?


回答1:


The Program options should not be node.exe (that would mean you are trying to typescript code as javascript). It needs to be tsc or node tsc(that means you want to run tsc to compile the file to javascript).

PS: this video might be helpful : https://www.youtube.com/watch?v=RWXGMug_Rmo&hd=1



来源:https://stackoverflow.com/questions/25394751/typescript-unexpected-reserved-word-in-phpstorm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!