TypeScript is now officially 10 years old
31–40 of 207 posts
Re: TypeScript is now officially 10 years old
#32Typescript is for big project and team collaboration. JS is still my choice for personal or small project. Fast!
Re: TypeScript is now officially 10 years old
#33Re: TypeScript is now officially 10 years old
#34>TypeScript never set out to build a separate, distinct, and prescriptive language. Instead, TypeScript had to be descriptive. Sadly, the majority of people writing Typescript rarely care about descriptive and readable code these days. Somehow the focus shifted from using types to better understand complex systems through the code itself , to writing whatever polymorphic union type abomination that yields the best In…
This. Probably every TS codebase I ever worked in had zero to none function- or inline docs with people always claiming "documented by TS". I call that BS, and you can see that in their projects. "Typescript codebase" became the equivalent of "generic low quality codebase" imo. I'll never understand why people need a programming language inside a programming language and refuse simplicity (i.e. using jsdocs, which ha…
Re: TypeScript is now officially 10 years old
#35Quoted post unavailable.
Re: TypeScript is now officially 10 years old
#36Re: TypeScript is now officially 10 years old
#37Even before Deno made it easy, it was straightforward enough to configure a simple tsconfig and just run tsc. Much like cargo, there is a lot to be said for "it just works" tooling - especially for beginners or even new programmers.
It is probably fair to say it is one of the most influential and impactful languages of all time. There's even the future possibility of much of its type syntax being absorbed back into JavaScript: https://github.com/tc39/proposal-type-annotations
Re: TypeScript is now officially 10 years old
#38So what is the best book (under 250 pages!) to learn TS?
There are two main resources I would recommend:
- for those who prefer written content, the TypeScript Handbook [1]
- for those who prefer video content, the first couple videos of Jack Herrington's No BS TS series [2]
Other than that, just start using it. My main advice would be that your TS code should look as much like JS code as possible, ie don't explicitly type everything, just rely on inference where possible. Basic generics can be useful occasionally, but most of the "Type Challenge" type stuff is only really useful to library developers.
[1] https://www.typescriptlang.org/docs/handbook/intro.html
[2] https://www.youtube.com/watch?v=LKVHFHJsiO0&list=PLNqp92_EXZ...
Re: TypeScript is now officially 10 years old
#39>TypeScript never set out to build a separate, distinct, and prescriptive language. Instead, TypeScript had to be descriptive. Sadly, the majority of people writing Typescript rarely care about descriptive and readable code these days. Somehow the focus shifted from using types to better understand complex systems through the code itself , to writing whatever polymorphic union type abomination that yields the best In…
I have no doubt codebases with polymorphic union type abominations exist, but I wouldn't say they are the majority, far from it in my experience.
It also seems to me those are a case of "problem lies between chair and keyboard", not a fault of the language. Bad code can be written in any language.
Re: TypeScript is now officially 10 years old
#40Typescript was my stepping stone into the world of Rust. Even before Deno made it easy, it was straightforward enough to configure a simple tsconfig and just run tsc. Much like cargo, there is a lot to be said for "it just works" tooling - especially for beginners or even new programmers. It is probably fair to say it is one of the most influential and impactful languages of all time. There's even the future possibil…
... as comments. Which superficially resemble the syntax of type hints but do nothing. Which has to be one of the worst language design decisions of all time.