Skip to content

Using in vanilla JS / JavaScript projects #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Cortys opened this issue Apr 29, 2015 · 16 comments · Fixed by #1456
Closed

Using in vanilla JS / JavaScript projects #315

Cortys opened this issue Apr 29, 2015 · 16 comments · Fixed by #1456
Assignees
Labels

Comments

@Cortys
Copy link

Cortys commented Apr 29, 2015

Is it possible to use this package for vanilla js?

Even without the type annotations, TypeScripts autocomplete suggestions are a lot better than those of most other Atom packages I tried.

@basarat
Copy link
Member

basarat commented Apr 30, 2015

Even without the type annotations,

sadly not at the moment. The TypeScript compiler is really stingy about file extensions. And we've followed this convention deep within our code.

Leaving open as a wishlist 🌹

@basarat basarat changed the title Using in vanilla JS projects Using in vanilla JS / JavaScript projects Jul 21, 2015
@scottwio
Copy link

For me this is more about being able to use some of typescripts abilities without having to change the workflow of everyone on the team. For a lot of people even changing the file extension is to much as they are js purists aka don't like the idea of typescript. This way you can work along side another js dev without effecting them at all.

I wonder how Visual Studio Code has implemented the feature as they are just using the standard ts compiler.

@dbroadhurst
Copy link

+1 It would be great use TS features in .js files

@nycdotnet
Copy link
Contributor

It seems the TypeScript team agrees. Take a look at the items tagged salsa on their issues list. This may be coming in a future language service version, in which case I assume we'd add support for it.

@cebor
Copy link

cebor commented Oct 26, 2015

👍

3 similar comments
@andrew-w-ross
Copy link

+1

@PanayotCankov
Copy link

👍

@bry5912
Copy link

bry5912 commented Nov 13, 2015

👍

@aminroosta
Copy link

:+

@IdanAdar
Copy link

+1

@basarat basarat added task and removed wishlist labels Jan 29, 2016
@basarat basarat self-assigned this Jan 29, 2016
@basarat
Copy link
Member

basarat commented Jan 29, 2016

Foreword: I will most likely not get to it anytime soon.

TypeScript has officially unleashed the allowJS option : http://blogs.msdn.com/b/typescript/archive/2016/01/28/announcing-typescript-1-8-beta.aspx

So about time we support it. Not marking as up for grabs as reviewing this is going to be just as much work as adding and then supporting it. The following is a list of tasks that needs to happen

  • allowJS in tsconfig compiler options
  • change the default glob based on that
  • change the default project creation result to at least output the key so the user can change it easily
  • change the activation mechanism to activate on .js files as well

My BIG concerns are:

  • not fighting with other packages that also work on .js files e.g. tern
  • slowing down atom for JS files as atom-typescript is a bit bulky (mostly because that hasn't been my focus, TS projects tend to not be as messy as JS files).

Let me sit on it :-/ I am open for other ideas 🌹

@marlonfan
Copy link

+1

2 similar comments
@tabjy
Copy link

tabjy commented May 16, 2016

+1

@gfrancischini
Copy link

+1

@ericelliott
Copy link

not fighting with other packages that also work on .js files e.g. tern

Tern's hints are OK, but the UI is awkward compared to this plugin. There's a lot of overlap. My plan as a user was to remove tern and replace with atom-typescript.

I think we could simply document that users should disable tern if they want to use atom-typescript on JavaScript files.

@basarat
Copy link
Member

basarat commented Jul 22, 2016

It is now up for grabs. Also this project needs a new hero : #980 🌹

This was referenced Nov 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.