Runtime shape of a react-native-video event payload.
Every event the native view dispatches (e.g. onLoad) carries the
dispatching view's React tag as target at runtime, but the field is
absent from the library's typed payloads (OnLoadData etc.) — which is
why extracting it used to require an as unknown as { target: number }
cast. The optional target plus the index signature make any of those
payloads assignable without a cast — with target? alone, TypeScript's
weak-type check rejects payload types like OnLoadData that share no
declared property with this interface.
Runtime shape of a
react-native-videoevent payload.Every event the native view dispatches (e.g.
onLoad) carries the dispatching view's React tag astargetat runtime, but the field is absent from the library's typed payloads (OnLoadDataetc.) — which is why extracting it used to require anas unknown as { target: number }cast. The optionaltargetplus the index signature make any of those payloads assignable without a cast — withtarget?alone, TypeScript's weak-type check rejects payload types likeOnLoadDatathat share no declared property with this interface.