When unpacking an event message that has a defined "link" property (which would be a sibling of the "event" property), create a "link" property in the unpacked StoredEvent to hold the deserialized link information. This "link" would become another StoredEvent instance.
Such a structure should only exist if the stream was read using the resolveLinkTos flag.
NOTE: I also corrected a small error in the README and the TypeScript defs, which indicated that the "number" property in StoredEvent represents the event number. Based on what I saw in connection.js, the property is "eventNumber", not "number".
When unpacking an event message that has a defined "link" property (which would be a sibling of the "event" property), create a "link" property in the unpacked StoredEvent to hold the deserialized link information. This "link" would become another StoredEvent instance.
Such a structure should only exist if the stream was read using the resolveLinkTos flag.
NOTE: I also corrected a small error in the README and the TypeScript defs, which indicated that the "number" property in StoredEvent represents the event number. Based on what I saw in connection.js, the property is "eventNumber", not "number".
Original discussions: