Prevent ID switching mistake
Note: Basic understanding of generics and intersection types are assumed in this piece.
Problem
Ever faced a bug that’s caused by feeding in the wrong id to a function? For instance, a function expects studentId
, but you…