#generics
3 pages tagged generics.
3/3
typing
Go beyond list[int] and str | None. Covers Protocol, TypeVar bounds, ParamSpec, Concatenate, Self, Annotated, TypedDict with NotRequired/Required, TypeAlias, TypeGuard, TypeIs, cast, assert_type, and reveal_type.
React with TypeScript
Type-safe React patterns — function components, prop types, children, event handlers, refs, generic components, polymorphic `as` props, and Zod-powered forms.
Generics
TypeScript generics allow writing reusable, type-safe code that works over many types. Covers generic functions, interfaces, classes, constraints, keyof, conditional types, and the infer keyword.