01 / 03
Data from outside could be anything
Parse JSON from a server and the result could be an object, a string, or null.
TypeScript uses unknown for things whose type is not known yet. Unlike any, you cannot use it until you check.
const data: unknown = JSON.parse('{"name": "Yui"}');// data.name — error (unknown)