@aemvite - Migrate an AEM ui.frontend from Webpack to Vite
A from-scratch guide to @aemvite, an open-source npm toolchain that replaces webpack, Babel, PostCSS, ESLint, and aem-clientlib-generator in an AEM Maven archetype ui.frontend with Vite, esbuild, and Sass - with a byte-identical clientlib output guarantee.
Advanced Types
Conditional types, mapped types, template literal types, the infer keyword, and recursive types with real-world use cases.
Async/Await in JavaScript: Practical Patterns and Pitfalls
Learn async/await with TypeScript examples. Understand sequential vs parallel work, error handling, timeouts, and best practices.
Basic Types
TypeScript's primitive types, type inference, type annotations, arrays, tuples, and the any, unknown, never, and void types.
Classes
TypeScript class syntax, access modifiers, readonly, constructors, inheritance, abstract classes, and implementing interfaces.
Enums & Literal Types
Numeric enums, string enums, const enums, literal types, discriminated unions, and exhaustive checks in TypeScript.
Functions
Typed parameters, return types, optional and default parameters, rest params, function overloads, void vs never, and arrow functions in TypeScript.
Generics
Generic functions, interfaces, and classes in TypeScript, plus constraints with extends, default type parameters, and keyof and typeof operators.
Interfaces & Type Aliases
Defining object shapes with interface and type, optional and readonly properties, extending interfaces, intersection types, and structural typing.
Introduction & Environment Setup
What TypeScript is, why it exists, how to install it via npm, tsconfig basics, compiling with tsc, and your first typed program.
JavaScript Error Handling: Patterns, Types, and Best Practices
Learn practical JavaScript error handling with TypeScript examples. Cover try/catch, async errors, custom error types, and safe logging.
JavaScript Intl API: Currency, Date, and Number Formatting (TypeScript)
Learn currency formatting, date formatting, number formatting, list formatting, and more with the JavaScript Intl API. Practical TypeScript examples and best practices.
JavaScript Performance Basics: Measure, Optimize, and Scale
Practical JavaScript performance tips with TypeScript examples. Learn measurement, algorithmic complexity, caching, and avoiding common bottlenecks.
JSON Parsing in JavaScript: Safe Patterns and Practical Tips
Learn safe JSON parsing and serialization in JavaScript with TypeScript examples. Cover JSON.parse, JSON.stringify, revivers, validation, and common pitfalls.
LocalStorage and SessionStorage in JavaScript: Save, Load, and Remove Data
Learn how to store, load, update, and remove data using localStorage and sessionStorage. Includes JSON parse/stringify patterns and safe helpers.
Mocking in JavaScript & TypeScript
jest.fn(), jest.spyOn(), jest.mock() for modules, clearing and resetting mocks, mocking fetch and axios, and testing async code.
Modules & Declaration Files
ES modules in TypeScript, import and export patterns, declaration files (.d.ts), DefinitelyTyped, and writing your own type declarations.
Practice Project: TypeScript Utility Library
End-to-end exercise - build and test a small TypeScript utility library with Vitest (unit and integration tests), full coverage report, and GitHub Actions CI.
tsconfig & Tooling
Key tsconfig.json options explained, strict mode, target and lib, path aliases, project references, ts-node, tsx, and ESLint integration.
TypeScript
TypeScript adds static types to JavaScript - learn type annotations, interfaces, generics, union types, and how to set up a TypeScript project.
TypeScript in Practice
TypeScript with Node.js, TypeScript with React including event types and hooks, common real-world patterns, and migrating a JavaScript project to TypeScript.
TypeScript Integration
Strapi TypeScript: project setup, type generation, typing controllers and services, typed Document Service queries, custom type utilities, and migration from JS.
Unit Testing in JavaScript & TypeScript
Setting up Jest and Vitest, writing describe/it/test blocks, using expect matchers, lifecycle hooks, and running your test suite.
User Input Sanitization in JavaScript: Practical and Safe Patterns
Learn how to sanitize and validate user input in JavaScript with TypeScript examples. Covers frontend and backend basics, XSS prevention, and safe outputs.
Utility Types
Practical examples of TypeScript's built-in utility types - Partial, Required, Readonly, Pick, Omit, Record, Exclude, Extract, NonNullable, ReturnType, and Parameters.