How this tool computes its result
Recursively infers TypeScript types from JSON structure using a GeneratorContext to track named interfaces and prevent duplicate interface names. For objects, it generates an interface with typed fields; for arrays, it infers element type and returns T[]; for primitives, it returns string/number/boolean/null/unknown. Null values are marked optional (?). Generated interfaces are exported and referenced by name. If the root is a primitive or simple array, the output is a type alias instead of interfaces.
