Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Typescript compilation #22

Closed
tomitrescak opened this issue Sep 13, 2017 · 12 comments
Closed

Typescript compilation #22

tomitrescak opened this issue Sep 13, 2017 · 12 comments

Comments

@tomitrescak
Copy link

Hi, is there any doc explaining how the compilation works? In my project "tsc" return no error. ide-typescript finds hundreds of errors. It looks like it is using some outdated Typescript version. Can this be somehow configured?

I even got error on "import * as React from 'react';" - File '/Users/tomi/Github/packages/webpack2-typescript-2/node_modules/@types/react/index.d.ts' is not a module.

But overall the first look is impressive!

@cupsadarius
Copy link

cupsadarius commented Sep 13, 2017

I'm getting this one too, [email protected] works ok from cli but your integrated version throws some errors when importing modules

Ex: import * as mysql from 'mysql'; i get

File '.../node_modules/@types/mysql/index.d.ts' is not a module.

But it seems like it's a limitation from javascript-typescript-langserver which still only supports [email protected]

@damieng
Copy link
Contributor

damieng commented Sep 14, 2017

Yes, we depend on javascript-typescript-langserver as the typescript server itself does not talk Microsoft's own language server protocol (despite me asking both the TS team and Anders :( )

@lierdakil
Copy link

For anyone interested, here's a relevant TS issue microsoft/TypeScript#11274. When/if TypeScript implements LSP natively, this will be very straightforward to fix. Until then, probably not.

@cupsadarius
Copy link

@damieng @lierdakil thanks for the input, we'll have to wait and see.

@tomitrescak
Copy link
Author

Yeah, thanks for the info! Will wait and see how this evolves.

@bronson
Copy link

bronson commented Sep 21, 2017

Ah, that explains why export default interface foo { } shows tons of syntax errors in Atom, but tsc compiles it just fine.

2.3.4, oof: https://github.com/sourcegraph/javascript-typescript-langserver/blob/6087974050c313488b2497c1c7aee10a3d8b3a15/package.json#L53

It might help to change this issue's title to something like "ide-typescript uses an older version of typescript".

Wishing luck and smooth coding to the MS team.

@damieng
Copy link
Contributor

damieng commented Feb 20, 2018

The latest ide-typescript package now uses TypeScript 2.7.2 (the latest stable) so these specific errors should now be gone.

@damieng damieng closed this as completed Feb 20, 2018
@ttsirkia
Copy link

ttsirkia commented Mar 4, 2018

I can still see the problem. For example, by using this repo: https://github.com/infernojs/inferno-typescript-example

Compiling with tsc works fine.

@b-fuze
Copy link

b-fuze commented May 28, 2018

I have the same issues with a JS file checked by TS
image

@pyxarez
Copy link

pyxarez commented Aug 1, 2018

@damieng , I just installed the package ide-typescript and see the same error as in the topic, can you please help?
Example:

  • module
    image
  • error
    image
  • import
    image

@sylvaindesve
Copy link

I get the same errors. They go away if I reload Atom.

@damieng
Copy link
Contributor

damieng commented Nov 14, 2018

A lot of these errors are being caused in a lower layer of ide-typescript known as the SourceGraph language server wrapper for TypeScript.

I'm working on switching ide-typescript away from that to a more reliable language server known as Theia which should solve this problem and many others. It will be in the next release hopefully out in the next few days if we can sort out the remaining issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants