TypeScript — compile-time type checking.
1interface UserProps {2 name: string;3 age: number;4 email?: string;5 onUpdate: (user: User) => void;6}78function User({ name, age, email, onUpdate }: UserProps) {9 return <div>{name}, {age}</div>;10}
vs prop-types: TypeScript is compile-time, faster, richer types. prop-types is runtime, adds bundle size.
Benefits: Catch errors at build time, better IDE support, no runtime overhead, interface documentation.
Migration: Gradual — add TypeScript file by file.