PitchKit
API Reference@pitchkit/data-providersstatsbombFunctions

ofType()

function ofType(events, typeName): StatsBombGenericEvent[];

Defined in: packages/data-providers/src/statsbomb/select.ts:86

Escape hatch for the event types this package doesn't model explicitly — ofType(events, "Duel"), ofType(events, "Goal Keeper"), and so on.

The result is typed as a generic event, whose index signature reaches the type-specific sub-object (duel, goalkeeper, ...) as unknown. Nothing in a feed is ever unreachable; it just isn't typed for you.

Parameters

ParameterType
eventsreadonly StatsBombEvent[]
typeNamestring

Returns

StatsBombGenericEvent[]

On this page