A response type with four optional properties permits sixteen shapes, of which three are valid. The compiler now narrows on status, so the branch that reads data is…
LIMIT 50 OFFSET 45000 reads forty-five thousand rows and discards them, which is fine until somebody paginates to the end. The row-value comparison is the part that trips…
A message shape is a contract with every consumer that exists and every consumer that is mid-deploy. Adding an optional field is safe because an old consumer ignores…
Hand-written validation in a REST callback, when the argument definition can do it and produce documentation at the same time. The argument schema validates before the callback runs,…
A status filter validated with an in: rule listing seven values, which had drifted from the eight the enum defined. The drift is the whole point: any list…
Four years of an API with no version number in the path, because the rule was that nothing incompatible ships. The discipline is cheaper than versioning and it…
Three packages in the same application, each with its own curl wrapper, each with its own idea of what a timeout means. The value is not the abstraction,…
Generated types describe what the specification says, and the specification is a document rather than a runtime guarantee. res.json() returns any and assigning it to a generated type…