A resource registered in SanitySchemasByResource is answered from there and only there:
a document type absent from a registered resource is never, never the legacy union,
because an unrelated union looks precise while describing the wrong dataset.
A key known only as a pattern, such as ${string}.${string} from a DocumentHandle<'post'>
prop or a resource chosen at runtime, resolves to the union of the document type across the
registered resources it can match: the document is one of those. A key that matches no
registration, or a lookup whose document type is also only string, uses the experimental
Typegen declarations as before, which is what keeps saved generated files working.
Resolves a document type for one resource.
A resource registered in
SanitySchemasByResourceis answered from there and only there: a document type absent from a registered resource isnever, never the legacy union, because an unrelated union looks precise while describing the wrong dataset.A key known only as a pattern, such as
${string}.${string}from aDocumentHandle<'post'>prop or a resource chosen at runtime, resolves to the union of the document type across the registered resources it can match: the document is one of those. A key that matches no registration, or a lookup whose document type is also onlystring, uses the experimental Typegen declarations as before, which is what keeps saved generated files working.