Live data from Hacker News

Announcing TypeScript 2.2

blogs.msdn.microsoft.com

111–120 of 123 posts

Re: Announcing TypeScript 2.2

#111
post #87
post #49

Earlier quoted context omitted.

The price gets lower each year for the first few years you renew your license. My company pays for my license but I think it's hella worth it and I'd pay it on my own if I had to. I avoid VS like the plague and I've never really felt at home in an IDE until I started using IntelliJ. It's the only thing that was able to get me off of Notepad++

Like other replies said, VS Code is nothing like VS. I've been a dedicated Sublime Text user for years (wary of IDEs like you) but VS code kicks ST2/3's butt for Typescript development.

Thanks, I'll have to give it a shot!

Re: Announcing TypeScript 2.2

#112
post #78

Earlier quoted context omitted.

Yeah, that's what I use with Webpack. It's just one more rule on Webpack config, so no reason not to do it. There's many things that are out of scope of TS that are better handled by Babel (like embedding corejs methods based on target browser versions).

If you're using Webpack is it possible to gradually opt files into TS type checking _without_ having to rename them, since you can specify which filename patterns loaders apply to?

I believe you might be able to with --allowJs, but to be quite honest I haven't done so. All my projects were TypeScript-based from the start, even if sometimes I end up using JS dependencies.

Re: Announcing TypeScript 2.2

#113
post #100

Earlier quoted context omitted.

Apart from Intellisense completion, a full featured integrated debugger, version control integration wich supports line wise staging, a diff viewer, a fast integrated terminal that even gets link detection in the next release, proper variable renaming and a working "Go to Definition" that is even implemented in most of the third party language plugins? No. Pretty much the same as Notepad++.

IntelliJ has all of those things. I'm not sure you understood my question. I use Webstorm daily, I'm using it this very moment. I was asking about VSCode and where it falls between IntelliJ and N++.

I also use WebStorm. But VScode is lightweight, starts up in two seconds and typescript support is always up2date with the latest typescript release. Changing user/language preferences in VSCode is a breeze as you simple open and edit the settings files with rich language support and intellisense. WebStorm requires you to open that horrible application modal Settings dialog. VSCode is also highly responsive compared to WebStorm which tends to lag a bit. I also like the quick info and peek features of visual studio code. However, there are folks who find this distracting.

WebStorm beats VSCode hands down in refactoring though.

Re: Announcing TypeScript 2.2

#114
post #106

Earlier quoted context omitted.

Some people were doing that before TS got async/await compilation directly to ES5 (in TS 2.1). Right now, having Babel in the TS pipeline is not that useful anymore.

I've had some major headaches getting TypeScript to work with Babel and Webpack 2. The main reason I had to use Babel was because I wanted to use Webpack 2's tree shaking feature. Do you know if it's possible to use just TypeScript and Webpack without Babel, and still take advantage of tree shaking? Honestly this is the main thing keeping me from using TypeScript. I've spent hours, maybe days trying to deal with the…

«Another problem I ran into was using various packages that weren't typed, but I suppose I can solve that by 'allowing' implicitAny.»

You can keep noImplicitAny and any-type just specific packages that can't/won't be typed. The declaration is now as simple as:

    declare module 'path/to/module-name'
Typescript will any type modules that you declare that way. You can also use star (*) and star-star wildcards in the module name.

Re: Announcing TypeScript 2.2

#115

Earlier quoted context omitted.

I'm not sure this answers your question, but: I've been working with TS for the past couple of years but now I'm working on a Flow project. Flow doesn't even compare. It falls short on many things TS would immediately flag, and just feels less thought-out (subjective I know). Tooling support is terrible and while not the language's fault, it means it just doesn't help you as much as it could. Using Flow basically bec…

> It falls short on many things TS would immediately flag I'm kind of curious what you've run into personally. Having a dependency without any type-defs get silently treated as `any` is my own beef, but I haven't hit much else yet. (Some type-defs' use for `any` also gets my goat, such as Promise's catch argument and some of the lodash functions, but I'm considering that a separate thing.) ​ > And honestly, some of t…

«Having a dependency without any type-defs get silently treated as `any` is my own beef»

You can add the compiler flag --noImplicitAny to get errors if you prefer.

Re: Announcing TypeScript 2.2

#116
post #71
post #57

Earlier quoted context omitted.

I've done some average sized projects in Flow and in TypeScript, and it's a lot more subtle IMO than most people would have it (especially people who only tried one, or only tried both cursively) TypeScript absolutely has the better tooling. It's not even -close-. It's a little tricky though because a lot of FE devs these days use VIM or Sublime with a few plugins and a linter running in a terminal is as far as it go…

> TypeScript's type definitions I found are very, very poor, as a relic of the days where versioning was an issue and many have not been fixed. I've always found it funny that DefinitelyTyped's tag line is "The repository for high quality TypeScript type definitions", but it's an absolutely disastrous system. If it's not a well-used library, definitions there will be woefully out of date. Versioning is a huge issue w…

I too feel that as a types contributor I've mostly given up on trying to contribute to DefinitelyTyped and try to contribute directly to library authors. I also think that DT has grown far too big and far too hard to contribute to, especially for fixes to types to small, lesser used libraries.

Re: Announcing TypeScript 2.2

#117
post #106

Earlier quoted context omitted.

I've had some major headaches getting TypeScript to work with Babel and Webpack 2. The main reason I had to use Babel was because I wanted to use Webpack 2's tree shaking feature. Do you know if it's possible to use just TypeScript and Webpack without Babel, and still take advantage of tree shaking? Honestly this is the main thing keeping me from using TypeScript. I've spent hours, maybe days trying to deal with the…

«Another problem I ran into was using various packages that weren't typed, but I suppose I can solve that by 'allowing' implicitAny.» You can keep noImplicitAny and any-type just specific packages that can't/won't be typed. The declaration is now as simple as: declare module 'path/to/module-name' Typescript will any type modules that you declare that way. You can also use star (*) and star-star wildcards in the modul…

Oh, that's great! Is that a recent change? I remember circumvrenting my issues with 'declare module' but it was more involved than just one line.

Re: Announcing TypeScript 2.2

#118
post #117

Earlier quoted context omitted.

«Another problem I ran into was using various packages that weren't typed, but I suppose I can solve that by 'allowing' implicitAny.» You can keep noImplicitAny and any-type just specific packages that can't/won't be typed. The declaration is now as simple as: declare module 'path/to/module-name' Typescript will any type modules that you declare that way. You can also use star (*) and star-star wildcards in the modul…

Oh, that's great! Is that a recent change? I remember circumvrenting my issues with 'declare module' but it was more involved than just one line.

Yes, simpler module declaration is relatively recent to Typescript having arrived in Typescript 2.0 (released in September).

Re: Announcing TypeScript 2.2

#119
post #100

Earlier quoted context omitted.

Apart from Intellisense completion, a full featured integrated debugger, version control integration wich supports line wise staging, a diff viewer, a fast integrated terminal that even gets link detection in the next release, proper variable renaming and a working "Go to Definition" that is even implemented in most of the third party language plugins? No. Pretty much the same as Notepad++.

IntelliJ has all of those things. I'm not sure you understood my question. I use Webstorm daily, I'm using it this very moment. I was asking about VSCode and where it falls between IntelliJ and N++.

I understood the question – and that IntelliJ has all of those things is exactly the point I was trying to make.

You get most of the features from a heavyweight IDE, but they managed to get the architecture incredibly lightweight so you can use it as a "daily driver" editor as well.

It is snappy enough to quickly edit some configuration or Markdown files (with live preview and clickable links), it has text based configuration files, its easy to write plugins with a couple of lines of code – and all sorts of other things that previously could only be found on the "editor-side" of the spectrum (export VISUAL="code -w", anyone?).

Unique selling points are quite hard to find, most things where invented somewhere else. Its more the combination of things and walking the thin line between the text editor and IDE worlds.

Re: Announcing TypeScript 2.2

#120
post #32

Earlier quoted context omitted.

Well that solved some problems (e.g. importing from react-router/lib/*) but autocomplete for TSX is non-functional. Still pretty frustrating considering ES6 works out of the box.

I could be doing things wrong but in my exp, Webstorm's autocomplete is non-existent for anything that you import

I have the same issue for some of the libraries. I'm just starting with TS so it can be user error. However, I found that you can download the typings in the IDE in Settings/Javascripts/Libraries and download... This is tedious to have to do this though. Note: doing this works with normal JS as well which is pretty cool.
Post reply on HN