TypeScript

TypeScript is a popular open-source programming language developed and maintained by Microsoft. It is a statically typed superset of JavaScript that adds optional static typing and other features to help developers write more robust and maintainable code.

TypeScript compiles to plain JavaScript, making it compatible with all JavaScript environments and runtimes.

Related Tags

Tutorials

Order in which TypeScript decorators are evaluated and applied on the Order class

TypeScript Utility Types: Partial, Pick, Omit and Record

TypeScript utility types create new types from an existing one, such as an all-optional copy or a subset of keys. This reference lists all 22 built-in utility types with their results, gives one example each for Partial, Pick, Omit, Record, Exclude, ReturnType and Awaited, and shows the real tsc errors we get when we use them wrong.

TypeScript satisfies Operator: vs as and as const satisfies

The TypeScript satisfies operator checks a value against a type and keeps the narrow type TypeScript inferred for it. We compare satisfies with type annotations and as assertions, use it on settings objects, Record maps and as const tables, and read the real tsc errors for the common mistakes.

TypeScript Decorators: Method, Class and Field Examples

A TypeScript decorator is a function that we put above a class or class member with @name, and it can replace that member with a new version. Learn each decorator kind with runnable TypeScript 7 examples, the order decorators run in, the usual compiler errors, and how standard decorators differ from experimentalDecorators used by Angular, NestJS and TypeORM.

TypeScript 6: New Features, New Defaults and Deprecations

TypeScript 6 is the last TypeScript release with a JavaScript-based compiler. It changes tsconfig.json defaults such as strict and types, and deprecates options that TypeScript 7 removes. This overview lists every change with the real tsc errors and an upgrade checklist for 5.x projects.

TypeScript 7 vs TypeScript 6: Native Go Compiler Explained

TypeScript 7 is the Go port of the TypeScript compiler and checks the same language as TypeScript 6 about 10 times faster. We compare both versions in a table, time tsc 6.0.3 and tsc 7.0.2 on the same project, and show what still needs TypeScript 6 and how to switch.

JavaScript Check if Variable is a Number (and NaN Traps)

Number.isFinite() is the reliable way to check if a variable is a number in JavaScript. Learn why typeof and the global isNaN() let bad values through, how to validate numeric strings from forms, and how to write a TypeScript type guard.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.