New to Javascript here, what does Javascript and Typescript have in common ?
New to Javascript here, what does Javascript and Typescript have in common ?
Do I master Typescript if I master Javascript ? Is Typescript syntax different ? Answers appreciated, thank you !
You're viewing a single thread.
TypeScript is a superset of JavaScript. It means any valid JavaScript is also valid TypeScript.
You should start to learn basic JavaScript mechanisms : prototype inheritance, hoisting, scopes, this, event loop, type coercion.
Once « JavaScript » sounds familiar you will embrace TypeScript which is JavaScript with steroids!
6 0 ReplyTypeScript is a superset of JavaScript. It means any valid JavaScript is also valid TypeScript.
This is backwards. JS is superset and all TS compiles to valid JS.
The vast majority of JS does not translate to Typescript as the JS is untyped.
1 5 ReplyYou don’t need to necessarily believe me but please double check your claims before you spread misinformation
5 0 ReplyTo be a superset, all elements of the subset must be contained within the superset.
TypeScript is a superset of JavaScript as valid JS code(just with everything implicitly the
any
type) is valid TS code.4 0 ReplyOh yeah if you add some sort of typing to the Javascript, sure.
1 1 Reply