Can anyone recommend a good introduction/book to TypeScript for people who already know some programming (e.g. Java, Python) but have no experience with JavaScript?

The only texts I’ve found so far assume prior JS knowledge (like The TypeScript Handbook https://www.typescriptlang.org/docs/handbook/intro.html) or seem rather unstructured to me (e.g. dropping a lot of different ways and shortcuts to do things without explaining concepts or making no clear distinction between basics/best practices and advanced use cases/edge cases).

Ideally it would explain core concepts (like functions, types, classes, …) first, with their most common use cases. Later chapter would do deep dives into different topics.

Edit: when I’m talking about TypeScript I’m talking about the whole language, not just the “modifications” it makes to JavaScript.

  • homoludens@feddit.deOP
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I know TS doesn’t remove that much from JS, but I expect the typing, structuring etc. to prevent some behavior that can occur in JS - otherwise what would be the point of e.g. the typing system? So that are the parts I don’t need to learn (at least not at first).

    I think an important point for me is that I’d rather learn “from a TS perspective”, that is starting with best practices and common use cases as they appear in a TS environment. Right now it sounds to me that the usual way would be to read some JS book, where I learn e.g. about functions or objects. And then I would read another book with all the modifications that TS makes to e.g. functions or objects.