PitchKit

isPlayerPossession()

function isPlayerPossession(event): event is SkillCornerPlayerPossession;

Defined in: packages/data-providers/src/skillcorner/select.ts:22

Guards and selectors — the only things here that narrow the event union.

SkillCorner's discriminant is top level, so event.event_type === "off_ball_run" narrows natively too (unlike StatsBomb's nested one). These guards go a step further and confirm the row actually carries the fields the type promises.

Parameters

ParameterType
eventSkillCornerEvent

Returns

event is SkillCornerPlayerPossession

On this page