Search code examples
macostypescriptvisual-studio-mac

Can't edit TS files in VS for Mac


I'm trying to make a SPA with .Net Core and Angular.

So I followed this tutorial: Microsoft

It runs perfectly. Even if I open the solution in VS4Mac.

The problem is that I can't edit the typescript files. I've searched everywhere!

I have the latest version of everything involved. NodeJS, VS4Mac, etc...

Update after the comments bellow:

  • I've reinstalled VS for Mac and it didn't help.
  • I can see and open them in VS. But as soon as I start writing, a box appears with a message "no completions found".
  • I can open and edit in other editors.
  • I even did "chmod 777" to a file just to see if it were the permissions, but it didn't help.
  • I'd tried to disable IntelliSense, but No difference.

I have no idea of what is the reason why VS for Mac can't edit ts. And I'd like to use a native IDE, instead of a VM. Could it be that VS for Mac CAN'T edit typscript altogether? I haven't been able to prove otherwise. Has anybody else been able to edit TS with this IDE?


Solution

  • I am able to create and edit TypeScript (TS) files in Visual Studio for Mac (Version 7.1, screenshot below). Now, as far as I can tell, the IDE does not support TS compilation out of the box, so you'll have to compile yourself via tsc (TypeScript Compiler) or another transpiler (ex. Babel) with TS plugin.

    enter image description here

    That being said, a better editing experience for TypeScript on Mac is WebStorm, an IDE from JetBrains, which supports TypeScript out-of-the-box.