
Introducing Typescript
What is Typescript?
Typescript is a typed superset of JavaScript and was created by Microsoft in 2012 ...
For further actions, you may consider blocking this person and/or reporting abuse
Thank you for the article. I want to correct some mistakes. The first which I have spotted, and it is very common is:
Wrong information about OOP
TS is multi-paradigm language in the same way JS is, JS has also OOP features and at this level TS is in any way more object oriented than JS itself. Statement that TS is OOP and JS is not, would never be correct, as objects exists in the language from beginning. But before ES6 there was no
class
keyword, and no classical class based OOP syntax, now it's history though.That said below quote is also outdated information:
Wrong information about
void
typeAnother mistake is:
Lets check if this is true:
It means
void
is not a subtype ofundefined
type.undefined
is really a unit type in the same wayvoid
is, there is no relation between these types.Mistake about
instanceof
Its not valid,
instanceof
is valid JS operator, it works only with objects created bynew
. Its not any kind of TS feature, saying that it has something withis incorrect.
Also I very dislike the whole Step 9 as it mixes JS operators which exists in the runtime with TS operators existing only at compilation. In Step 2 you describe some types in some random way, and surprisingly there is no info about Record and Union types which are the basic tool for every TS programmer.
In summary I want to thank you for the effort, but I am very sorry to say in my opinion some information's in the article could be double checked and verified.
Hi Ben! I am pleased to hear that you found the tutorial helpful. I do have a few TS resources in mind that range in difficulty level, depending on your learning goals.
Here is an article on advanced TS: educative.io/blog/advanced-typescr...
An article on using TS & React: educative.io/blog/react-and-typesc...
Another, more extensive beginner's guide to TS: valentinog.com/blog/typescript/
The official documentation and tutorial for TS (these are a bit denser, but can be helpful): typescriptlang.org/v2/docs/home
Here is a helpful learning track specifically for TS developers: educative.io/track/typescript-for-...
My recommendation is to avoid using videos unless you have benefited from them in the past. TS can be tricky to learn, and it requires some exploration & hands-on trial/error to figure out. One great way to learn is to look at other peoples' TS projects and try to replicate them.
Hope that helps!
Thank you for great tutorial
Thanks for the great article Amanda, can you just edit the code blocks to support highlighting markdownguide.org/extended-syntax/...
Thank you for this introduction!
fab thanks
It was a helpful guide. Thank you
Can someone explain TypeScript to me like I'm 5 years old?
codebond ・ May 17 ・ 1 min read