TypeScript basicsbeginner
A type is a note to your future self that the compiler checks — annotating what goes in and what comes out is where most of the value is, before any advanced feature.
JSON.parse returns any, and that any has spread through the file: parseMenuItem returns it, so a price of "5" sails through. Contain it with unknown and a type guard, and make every function say what it returns.
No any escapes JSON.parse, the guard is a predicate, every bad input is rejected, and every function declares its return type.
Published in full, before you start — every point is one of these and there is nothing else. Each one runs your code; it is not a search for keywords.
A type is a note to your future self that the compiler checks — annotating what goes in and what comes out is where most of the value is, before any advanced feature.