Skip to content

tsc errors #13

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
deivers opened this issue Aug 26, 2016 · 3 comments
Closed

tsc errors #13

deivers opened this issue Aug 26, 2016 · 3 comments

Comments

@deivers
Copy link

deivers commented Aug 26, 2016

Nice starter kit! I've been looking for something like this for a long time. It looks like it has all the pieces I want, and even a plan to add D3 (version 4, I hope!)

When I clone and do npm install then npm start, it seems to work, but I see the following in my ts compiler console (WebStorm): Error:Error: Parse tsconfig error [{"messageText":"Unknown compiler option 'noImplicitThis'.","category":1,"code":5023},{"messageText":"Unknown compiler option 'noUnusedLocals'.","category":1,"code":5023},{"messageText":"Unknown compiler option 'noUnusedParameters'.","category":1,"code":5023},{"messageText":"Unknown compiler option 'typeRoots'.","category":1,"code":5023},{"messageText":"Unknown compiler option 'lib'.","category":1,"code":5023},{"messageText":"Unknown compiler option 'strictNullChecks'.","category":1,"code":5023}]

I've confirmed that WebStorm is using the locally installed typescript. Am I missing something?

@piotrwitek
Copy link
Owner

Hi @deivers,
Thanks, I'm glad that you like it :)
Regarding D3 it'll definitely be an edge version, I'm also in the middle of adding a solid setup of Redux with React Router from my other project which should be finished this weekend.

Errors that you see are produced because the properties are the new features from TS v2.0 and WebStorm IDE uses it's own baked-in TS version, which is an older one thus not recognizing them.
You can of course simply delete them without any drawbacks, you'll just miss some recently added features in latest TS 2.0/2.1, but that's not a big deal.

If you'll like to benefit from newest features of TS you would need to use Atom or VS Code editor because they use latest TS language services, and for now I would really suggest to going with Atom which at the time have the best support and this starter kit is set-up to work best with it.

It's also worth to note that VS Code can use any typescript language version by using typescript.tsdk setting and the best approach from my experience is to use local TS per project for editor Intellisense, as this will give you an insight that the features you are using in your code are in fact compatible with currently used TS compiler version. Currently, you can only do it in VS Code,
Compared to Atom, VS Code is more feature-full and much more performant but lack in an ecosystem so I'm waiting for VS Code to mature a bit more.

There is also a new alternative from a creator of Atom TS Extension which I didn't have time to play with yet but looks very promising: http://alm.tools/

@piotrwitek
Copy link
Owner

@deivers this issues are resolved and should be merged later today
Right now compilation should work also using npm run tsc or just tsc -p src cli command, or if your ide is using local npm typescript installation
acknowledgement to @jonaskello for his contribution

@ShiiRochi
Copy link

ShiiRochi commented Nov 3, 2016

If the matter is a compiler then as far as I know, you can specify custom TypeScript compiler in WebStorm.

Settings => Languages & Frameworks => TypeScript.

In the right window of settings: right to TypeScript Version click on Edit and now just specify the path route to...for example...directory where typescript was installed with npm install -g typescript and then to its lib subdirectory. For example:

...\npm\node_modules\typescript\lib

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

No branches or pull requests

3 participants