Learning Resources

Programming Exercises

Practice with real problems and instant feedback.

6 / 6

intermediatetypescript

Typed Promise.all

Use Promise.all with proper TypeScript typing to run multiple async operations in parallel and collect typed results.

basictypescript

Readonly Array Types

Use TypeScript readonly array types to prevent mutation of array parameters in functions.

intermediatetypescript

Record Type for Maps

Use the Record utility type to create type-safe map objects with specific key and value types.

advancedtypescript

Recursive Type Definitions

Define a recursive TypeScript type for a tree structure and write a function to traverse it depth-first.

intermediatetypescript

Result Type for Error Handling

Implement a Result type for explicit error handling without exceptions in TypeScript.

basictypescript

Template Literal Types

Use TypeScript template literal types to create type-safe string patterns for HTTP method and path combinations.

advancedtypescript

Template Literal Type Inference

Use infer in template literal types to extract parts of type-safe string patterns at the type level.

intermediatetypescript

Advanced Template Literal Types

Use template literal types to create type-safe event names and CSS property selectors with string interpolation.

basictypescript

Tuple Type Operations

Use TypeScript tuple types to represent fixed-length arrays with specific element types at each position.

basictypescript

Type Assertion Safety

Use TypeScript type assertions to narrow an unknown value to a specific type with runtime validation.

intermediatetypescript

Custom Type Guard Functions

Write custom type guard functions using the is operator to narrow unknown data to specific types at runtime.

intermediatetypescript

Custom Type Guards

Write custom type guard functions to narrow union types at runtime in TypeScript.

basictypescript

Union Type Handling

Use TypeScript union types to handle values that can be one of several types, with proper type narrowing.

advancedtypescript

Custom Utility Types

Create custom utility types for deep partial, deep readonly, and path-based property access.

advancedtypescript

Variance in Generic Types

Explore TypeScript variance rules with covariant arrays and contravariant function parameters.