question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use globally installed typescript by default

See original GitHub issue

Right now the plugin checks for typescript_tsdk value in the sublime settings, and, if it isn’t present, it uses tsserver.js from the plugin directory.

I believe it should check if there is a tsserver available on PATH and use that (if typescript_tsdk isn’t set obviously). I can’t think of a scenario where a developer has typescript globally installed and wants to use one that is shipped with an editor plugin. Also It would be cool to check if there is a locally installed typescript in a project folder and use it for that specific project.

If you guys are cool with this proposal, I will be happy to work on a PR for this.

Cheers!

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
rafaelbitencommented, Oct 17, 2016

Wouldn’t it make more sense to first look for a local version of TypeScript, (installed per project via npm i -D typescript) to avoid problems with legacy projects using older versions of TS, then check for a global and only then fallback to whatever we currently have?

3reactions
Igonatocommented, Aug 15, 2016

It is sufficient when you know about it. Personally I learned that is exists while trying to figure out why does the plugin give me errors when the command line compiler works fine. So the expected behavior was that it should use the installed typescript, am I wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set up TypeScript
You can use npm to install TypeScript globally, this means that you can use the tsc command anywhere in your terminal. To do...
Read more >
How to install and run Typescript on Windows - beginner's guide
Install Typescript.​​ Run the following command in the cmd. npm install -g typescript . This will install Typescript globally. In the same manner ......
Read more >
How to use global Node packages with Typescript
Using global packages is possible by install them via npm install -g ... . If Typescript types are installed in this way, they...
Read more >
TypeScript Compiling with Visual Studio Code
You will need to install the TypeScript compiler either globally or in your workspace to transpile TypeScript source code to JavaScript ( tsc...
Read more >
How to install TypeScript on Mac using Node NPM
We will install TypeScript globally on our Mac so that we can access it from any directory. For this we will use the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found