The type of a session event this version does not know. It is a
session.* string, branded so TypeScript never narrows a known literal
('validation', 'session.created') to the unknown payload and never
drops the known payloads from the unknown guard's false branch. Read it as
a string, as in String(payload.type), or compare it through a cast.
The
typeof a session event this version does not know. It is asession.*string, branded so TypeScript never narrows a known literal ('validation','session.created') to the unknown payload and never drops the known payloads from the unknown guard's false branch. Read it as a string, as inString(payload.type), or compare it through a cast.