Improve Readability with TypeScript Numeric Separators when working with Large Numbers

InstructorRares Matei

Share this video with your friends

Send Tweet

When looking at large numbers in code (such as 1800000) it’s oftentimes difficult for the human eye to quickly see how big the number actually is. TypeScript allows us to use numeric separators to write numbers in a more human readable format (such as 1_800_000), while keeping the generated JavaScript unchanged.

Denis Spiridonov
~ 5 years ago

It is not possible to specify the accessibility of statics—they are effectively always public. (from spec) In other words, private in private static MAX_ALLOWED is not possible.

~ 3 years ago

This particular behavior also works in plain JS, doesn't it?