Code Explainers

Code explainers tagged #null-handling

typescript
type SortDirection = "asc" | "desc";
 
interface SortKey<T> {
  selector: (row: T) => string | number | Date | null | undefined;

Multi-column sorting in TypeScript

generics comparators sorting
Intermediate 6 steps