typeof null === 'object' in JavaScript, and @atlassian/atlassian-openapi's
own type-checking helpers rely on typeof x === 'object' to mean "a real
object I can index into" -- so every one of them throws on null instead of
returning false (see ai-planning/40-proposal-null-safe-document-walking.md
§2.1). A null reaches here whenever a structural slot -- a Schema, an
Operation, a Parameter -- is left empty in the source document (a YAML key
with nothing written after it): technically invalid OpenAPI, but an easy
mistake to make and, before this module existed, one that produced a raw
TypeError pointing into a dependency rather than into the input.
Every TC.* call this codebase makes goes through the wrapped version here
instead, so a null in a structural slot always becomes one clear, typed
error naming what was expected -- see proposal 40 §3b for why this errors
rather than silently skipping the slot or fabricating a stand-in.
typeof null === 'object'in JavaScript, and@atlassian/atlassian-openapi's own type-checking helpers rely ontypeof x === 'object'to mean "a real object I can index into" -- so every one of them throws onnullinstead of returningfalse(see ai-planning/40-proposal-null-safe-document-walking.md §2.1). Anullreaches here whenever a structural slot -- a Schema, an Operation, a Parameter -- is left empty in the source document (a YAML key with nothing written after it): technically invalid OpenAPI, but an easy mistake to make and, before this module existed, one that produced a rawTypeErrorpointing into a dependency rather than into the input.Every
TC.*call this codebase makes goes through the wrapped version here instead, so anullin a structural slot always becomes one clear, typed error naming what was expected -- see proposal 40 §3b for why this errors rather than silently skipping the slot or fabricating a stand-in.