Does this make sense or is it feasible to skip learning JavaScript and jump directly to TypeScript?
Does this make sense or is it feasible to skip learning JavaScript and jump directly to TypeScript?
That being said, I don't see why you couldn't learn them concurrently; you can learn the basics of TypeScript and then simply rewrite any relevant JS example code into TypeScript to learn JS code in a TS context.
Edit: I should also point out that integrating with any JS libraries may require you to install the '@types/' package alongside it to maintain type-safety. For example, if you're using jQuery, you can install the '@types/jquery' package which will expose all the type information for the jquery package.
On the other hand the upside, and a very big one, is that if you set up the relatively simple TS build process, you automatically get all the ES2015+ stuff for free, even without needing to figure out Webpack and Babel and the like (with some caveats front-end-wise, primarily Promises and Fetch).
If you want to develop an in-depth understanding of the language, I suggest reading through the ExploringJS [0] series. It covers pretty much every single edge case and detail. You don't have to read each book cover-to-cover, you can just skim parts you're familiar with.
To give you an idea of how awesome it is... Exploring ES6 is my go-to reference for anything related to ES6. When I first discovered the book I'd already been writing ES6 code for a while, and I thought I knew everything there was to know about it. But upon reading it, I was blown away by how many things I hadn't been aware of.
It's definitely feasible and it will even save a few headaches. It's especially good for learning the API because, of course, it provides intellisense.
I find myself downloading type definitions for JavaScript libraries because it's often a quicker form of documentation than the library's official docs.
> I was more worried about not understanding other code and libraries that are written in JavaScript style.
There isn't much stylistic difference; TypeScript is not a huge departure from JavaScript.
You can learn one before the other and a lot of the skills are transferable.
That said, I suspect it won't be too difficult, and quite worth your while, to learn 'idiomatic JavaScript' if you have experience with at least one other language. And especially with ES6 (which is 'included' in TS), if you have any experience with Ruby or Python you'll be fine with JS and it might even be a relatively pleasant experience.