• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Typescript Quickly: need to know JavaScript?

 
Ranch Hand
Posts: 37
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it necessary to know JavaScript for learning Typescript? Or what are the advantages one shall have if they are good with JavaScript when it comes to learning Typescript?
 
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typescript is a Java-like Object oriented language which also accepts java-script.
What that means is that When Typescript is compiled, it is first compiled into Javascript, which then is interpreted, JavaScript is a subset of Typescript, you can write Javascript code inside a typescript file and it is perfectly OK.
I think learning JavaScript is a big help for Typescript learners, because since you're learning Typescript, I assume that you want ot, or will end up working on Angular2+ in which case you will most likely interact with some front-end Javascript code.
Keep in mind that Typescript is a little more challenging than JavaScript, especially if you have not worked on common languages like Java and C++ before, but I think it is not challeging in the sense of the language itself, but the framework it uses (Angular2+) have a certain approach/ structure which may take some time to learn, not Typescript itself.
So, Yes learning JavaScript is a big help, it allows you to use Javascript in combination with Typescript (not a very popular practice among Angular2+ programmers, but it is used often). Java is also helpful in terms of knowing the object oriented part of Typescript.
 
Marshal
Posts: 67363
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd argue that the class system in TypeScript is based on ES6, not Java's class system.
 
hayder ma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree that Typescript  uses ES6 and behaves as a member of ES6 system family in terms of compilation and run time errors and exception handling, in this sense it behaves much like JavaScript, but from my experience, most of object oriented principles in Java are found in Typescript, it has the same access modifiers, function declarations, inheritance, interfaces and so on. When I was starting to learn Angular 2, I had no problem with object oriented, nor with Typescript as a language at all since I worked alot on Java before, it's much or less a Java syntax, I did struggle a bit with the framework -Angular 2 only.
 
M Mohile
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:I'd argue that the class system in TypeScript is based on ES6, not Java's class system.



what is different in TypeScript's class system when comparing the same with Java?
 
Author
Posts: 30
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not necessary to know JavaScript if you're planning to learn TypeScript from scratch.  Understanding the JavaScript basic syntax is helpful though.
 
You can't expect to wield supreme executive power just because
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!