Skip to Content
Mastering TypeScript - Fourth Edition
book

Mastering TypeScript - Fourth Edition

by Nathan Rozentals
April 2021
Beginner content levelBeginner
538 pages
12h 18m
English
Packt Publishing
Content preview from Mastering TypeScript - Fourth Edition

5

Asynchronous Language Features

The JavaScript runtime, whether it is running in the browser, or whether it is running on a server through Node, is single threaded. This means that one, and only one, piece of code will be running at a particular time. This code runs in what is known as the main thread. JavaScript has also been built around an asynchronous approach, meaning that the main thread will not pause when requested to load a resource of some sort. It will, instead, place this request onto an internal queue, which will eventually be processed at a later point in time. While the single-threadedness of JavaScript may take a while to get your head around, it does take away the need for in-memory locking mechanisms, as are used in other ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

TypeScript for Beginners

TypeScript for Beginners

Bharath Thippireddy
Learning TypeScript

Learning TypeScript

Josh Goldberg

Publisher Resources

ISBN: 9781800564732Supplemental Content