TypeScript Basics
Introduction to TypeScript, its purpose, and how it extends JavaScript with static typing.
CoreConceptLab
30 Concepts Explained
Introduction to TypeScript, its purpose, and how it extends JavaScript with static typing.
Explicitly defining variable and function types to ensure type safety.
TypeScript automatically infers types based on assigned values.
Basic types such as string, number, boolean, null, undefined, and symbol.
Defining structured data with properties and their types.
Defining arrays with specific element types.
Fixed-length arrays with defined types for each position.
Defining a set of named constants for readability and maintainability.
Allowing a value to be one of several types.
Combining multiple types into one.
Restricting values to specific literals such as 'yes' or 'no'.
Creating custom names for complex types.
Defining contracts for object shapes.
Object-oriented programming with TypeScript classes.
Controlling visibility of class members using public, private, and protected.
Properties that cannot be reassigned after initialization.
Properties that may or may not exist on an object.
Reusable components with type parameters.
Restricting generic types to specific shapes or values.
Built-in helpers like Partial, Pick, Omit, and Record.
Transforming types by iterating over keys.
Types that depend on conditions using extends.
Extracting keys of a type as a union.
Using typeof to capture the type of a variable.
Accessing the type of a property using square brackets.
Defining types for functions including parameters and return values.
Functions with multiple type signatures.
Comparison between interfaces and type aliases in TypeScript, highlighting differences in flexibility and features.
Exploring advanced compiler options in tsconfig.json such as strict mode, module resolution, and path mapping.
Combining multiple declarations with the same name into a single definition, useful for extending libraries.