Live data from Hacker News

I Was Wrong About TypeScript

triplet.fi

21–30 of 194 posts

Re: I Was Wrong About TypeScript

#22
With the arrival of TS 2.0 this month (hopefully) we'll have some cool features: a union types [1] b type guards to work with them [1] c nonullable types [2]

[1] https://www.typescriptlang.org/docs/handbook/advanced-types.... [2] https://github.com/Microsoft/TypeScript/pull/7140

As a Scala developer I like Typescript a lot. Which is a first for me in browser development.

But I'm not so fond of webpack et al. So I created a sbt-typescript plugin. And now I have incremental compilation of NG2 - Play apps for both the browser side and the server side. In a single build definition. It's a nice experience.

Re: I Was Wrong About TypeScript

#23
I find it funny - the first language I learned was ActionScript 3 (built on ECMA 4 proposal) and I become a Flash developer aka laughing stock. I remember I had very rough time transitioning to JavaScript because it felt like a stone age compared to ActionScript 3. Then came TS and saved me and dare I say the whole web.

Re: I Was Wrong About TypeScript

#24

I recently started learning TS after reading a previous HN post on it ( https://medium.com/@basarat/typescript-won-a4e0dfde4b08 ) and listening to the JS Jabber episode with Anders Hejlsberg himself explaining the benefits ( https://devchat.tv/js-jabber/209-jsj-typescript-with-anders-... ). These two (plus knowing that Angular 2.0 is going to be much easier with TX) totally sold me on learning it. I'm in the middle o…

About the text editor: I think all editors use the same TypeScript compiler APIs. That would mean that you would get pretty much same suggestions, error lists, etc. Correct me if I am wrong. VS Code could have some other API calls or project file support.

JS Jabber episode was great! Full of great insights.

Re: I Was Wrong About TypeScript

#25
post #7

I prefer frameworks that focus on pure javascript because the ones that don't tend to allow you too use javascript but have sparse documentation on how to use it effectively, instead focusing on typescript. When I first tried Angular 2 their javascript "hello world" example wouldn't even work, it was some bug in their site. I already need to use all sorts of other tools and abstraction layers when building websites/a…

I don't really work in the Javascript ecosystem, so when learning Angular 2 recently, I found all the other tools to carry far more cognitive load than Typescript.

> I found all the other tools to carry far more cognitive load

What tools are you talking about?

Re: I Was Wrong About TypeScript

#26
I just can't justify writing my team's code base in typescript. I don't want to make that move, setting us down a very specific path. I don't want to add another layer of training to develop on our codebase, but mainly, I just don't have the confidence that it's a right or wrong choice, and its a big choice.

But I get a sense that it would be great to try for smaller, disposable projects as that's limited risk.

Does anyone else struggle with TypeScript simply because of how big a choice it can be?

Re: I Was Wrong About TypeScript

#27

With the arrival of TS 2.0 this month (hopefully) we'll have some cool features: a union types [1] b type guards to work with them [1] c nonullable types [2] [1] https://www.typescriptlang.org/docs/handbook/advanced-types.... [2] https://github.com/Microsoft/TypeScript/pull/7140 As a Scala developer I like Typescript a lot. Which is a first for me in browser development. But I'm not so fond of webpack et al. So I cre…

I wonder is it some black humour to choose padLeft as an example source code. :)

Thanks for the links, future looks promising indeed.

Re: I Was Wrong About TypeScript

#28

Ashamedly at one point I was on the anti-Angular 2 bandwagon due to Typescript, because Microsoft. When I started learning Angular 2 myself I've found I actually enjoyed working with Typescript, for many reasons. (confidence that my code wasn't a ball of mystery before it ran, using inline templates, succinctness of annotations, etc) At the same time, you're gonna need to use some preexisting libraries, and run into…

About pre-existing libraries that don't have type definitions.

The way I dealt (until proper type definitions are written) was:

declare module "react-loader" { var noTypeInfoYet: any; export = noTypeInfoYet; }

Re: I Was Wrong About TypeScript

#29

With the arrival of TS 2.0 this month (hopefully) we'll have some cool features: a union types [1] b type guards to work with them [1] c nonullable types [2] [1] https://www.typescriptlang.org/docs/handbook/advanced-types.... [2] https://github.com/Microsoft/TypeScript/pull/7140 As a Scala developer I like Typescript a lot. Which is a first for me in browser development. But I'm not so fond of webpack et al. So I cre…

> As a Scala developer

Interesting, choosing TypeScript over Scala.js; what does TS offer vs. working directly in Scala across the board?

Re: I Was Wrong About TypeScript

#30
As something of a side note on this post, suggesting there is a single 'Dart/CoffeeScript route' that languages can take seems a bit misleading.

Dart is a whole different language that happens to be transpilable to JS. CoffeeScript is just a dash of syntactic sugar that (IMHO) makes JS a whole lot less tedious to write ('The golden rule of CoffeeScript is: "It's just JavaScript"').

Notwithstanding that, I am keen to try using TypeScript on a new project one of these days.

Post reply on HN