The structural shape of @fourjs/serialization's ComponentSerializer<T>.
Declared with method syntax, exactly as the original is, because
TypeScript's methods are bivariant in their parameters — which is what lets a
serializer for one concrete component type be stored in a registry that hands
out serializers for Component. node is unknown rather than Node: this
serializer does not use it, and unknown accepts whatever the registry
passes.
The structural shape of
@fourjs/serialization'sComponentSerializer<T>.Declared with method syntax, exactly as the original is, because TypeScript's methods are bivariant in their parameters — which is what lets a serializer for one concrete component type be stored in a registry that hands out serializers for
Component.nodeisunknownrather thanNode: this serializer does not use it, andunknownaccepts whatever the registry passes.