阅读中文版

These inputs demonstrate reproducible behaviour; they are not customer incidents or evidence of real usage.

Reproducible input

[{"id":1,"note":null,"tags":["admin"]},{"id":2,"tags":[]}]

Steps

  1. Generate TypeScript from both records in one array.
  2. Inspect note: it is optional because the second record omits it; its observed type is null.
  3. Add "note":"checked" to the second record and generate again. The field is now required with a null | string union.

Expected result

The original sample generates an optional note and Array<string> tags. The empty tags array does not introduce an any type.

Limits and manual checks

Samples cannot establish all valid future values. Dates stay strings, empty arrays alone use unknown, and optionality reflects only the supplied records. Review the generated type against the actual API contract.

Technical reference

Return to the task and choose the next check