Live data from Hacker News

TypeScript 2.4

blogs.msdn.microsoft.com

1–10 of 52 posts

Re: TypeScript 2.4

#2
They've just fixed what I regarded as the top reason for avoiding it completely: the broken type checking on functions.

It's a source of mystery that they didn't realise that was going to be a problem right from the start.

Re: TypeScript 2.4

#3
I only know a little bit of JavaScript, what's the best way to learn TypeScript? Read Eloquent JavaScript then some TS related stuff? Or is there a TypeScript for Dummies that don't know JS?

Re: TypeScript 2.4

#4
The string enums don't seem to work the same way as the number enums, there's no 2 way access.

For example.

enum Test { a } let a = Test.a; let b = Test[ 0 ]; // isn't available on the string ones

I wonder why its like that.

Re: TypeScript 2.4

#5
post #3

I only know a little bit of JavaScript, what's the best way to learn TypeScript? Read Eloquent JavaScript then some TS related stuff? Or is there a TypeScript for Dummies that don't know JS?

If you want a quick overview, then https://www.typescriptlang.org/docs/handbook/typescript-in-5....

If you want the full immersion, then read the entire Handbook: https://www.typescriptlang.org/docs/handbook/basic-types.htm....

Re: TypeScript 2.4

#6
post #3

I only know a little bit of JavaScript, what's the best way to learn TypeScript? Read Eloquent JavaScript then some TS related stuff? Or is there a TypeScript for Dummies that don't know JS?

For anything serious you are going to need to know JS, so yes, level up your JS first (up to ES5 is good enough) before switching to TS.

Re: TypeScript 2.4

#8
post #3

I only know a little bit of JavaScript, what's the best way to learn TypeScript? Read Eloquent JavaScript then some TS related stuff? Or is there a TypeScript for Dummies that don't know JS?

I learned JS through Eloquent JavaScript and did the various projects in the book, then changed all my .js files to .ts, turned on all of TypeScript's checks, and started adding types to my files.

I'd recommend doing a similar path; transitioning existing code to TS is IMO a better way to learn it than from scratch. TypeScript Deep Dive is a great resource.

Re: TypeScript 2.4

#9
post #3

I only know a little bit of JavaScript, what's the best way to learn TypeScript? Read Eloquent JavaScript then some TS related stuff? Or is there a TypeScript for Dummies that don't know JS?

Javascript the Good Parts by Crockford is a great book for people who already know a bit of JS but want to learn it proper and deeper.
Post reply on HN