Understanding Type Checking: A Comparison of TypeScript, .NET, and Java
A comparison of type checking options in TypeScript, .NET, and Java.

Comparison of Type Checking Options
| Feature | TypeScript | .NET (C#) | Java |
|---|---|---|---|
| Static Typing | Yes | Yes | Yes |
| Dynamic Typing | Yes (with | No | No |
| Union Types | Yes ( | No | No |
| Intersection Types | Yes ( | No | No |
| Optional Types | Yes ( | Yes (nullable types, | Yes (with |
| Type Inference | Yes | Yes | Limited |
| Generics | Yes | Yes | Yes |
| Type Aliases | Yes ( | No (use classes/interfaces instead) | No (use classes/interfaces instead) |
| Interfaces | Yes | Yes | Yes |
| Enums | Yes | Yes | Yes |
| Structural Typing | Yes | No (nominal typing) | No (nominal typing) |
| Nominal Typing | No | Yes | Yes |
| Type Guards | Yes ( | Yes ( | Yes ( |
| Type Casting | Yes ( | Yes ( | Yes ( |
| Type Annotations | Yes ( | Yes ( | Yes ( |
| Type Checking | Compile-time | Compile-time | Compile-time |
| Nullable Types | Yes ( | Yes ( | Yes ( |
Related Articles

Comparing TypeScript, .NET Core, and Java for Enterprise Servers
An in-depth look at the advantages and disadvantages of using TypeScript, .NET Core, and Java for enterprise server development.