the resource being referenced — BufferGeometry, Material
OptionalgetThe resource a saved key names, or undefined if the key is unknown.
OptionalkeyThe logical key resource is published under, or undefined if this
catalog does not publish it (which UnknownResourcePolicy then
decides the consequence of).
How the two directions of a §79 resource reference are resolved (2026-08-07, A-16).
§79 references resources "by logical key"; this is the pair of functions that decides what that key is and what it comes back as. Both halves are optional so that the two directions can be supplied separately — a build that only ever writes documents needs no
get— but supplying one without the other is exactly how a document that cannot be loaded gets written, so prefer resourceCatalog, which derives both from one map.A
ReadonlyMap<string, T>satisfies the read half as it stands, sinceMap.gethas precisely this signature.Both halves are declared with method syntax, which makes their parameters bivariant — the same deliberate choice, for the same reason, that
@fourjs/serialization'sComponentSerializerdocuments: a catalog ofSpriteMaterials has to be usable where a catalog ofMaterials is asked for, and the substitution is sound because a lookup that misses answersundefined, which is the case the callers already handle.