Subtask for #1700. Converting this subpackage to TypeScript should improve DX by ensuring re-exported components' types stay intact.