TypeDraft merges object members observed in one array. A key present in only some objects receives ?, while values with different scalar kinds become a visible union.
Output order is stable
Property order follows first observation; union members are sorted so the same sample produces the same text.
Sample every meaningful shape
Include representative members with missing keys, nulls and alternative scalar values. Then compare the optional fields and unions with the real API contract before adopting the declaration.
Review against the real contract
Compile the generated file, then compare every property with the authoritative API documentation, OpenAPI document or JSON Schema. Add fields absent from the sample, correct nullable and optional rules, and use runtime validation at untrusted boundaries. Keep a representative fixture beside the reviewed type so later payload changes are visible.