stream-js
stream-js copied to clipboard
Activity.object is typed as `string | unknown`
It happens in a few places, e.g. https://github.com/GetStream/stream-js/blob/main/src/feed.ts#L103
Note that string | unknown evaluates to just unknown - which likely defeats the purpose of the type annotation.
Looks like in the .NET client it's typed strictly as string.
Suggestion:
Update type from object: string | unknown to just object: string. Or maybe, if it is not guaranteed to always be present, to object?: string
yeah, ive just found this issue also, why hasnt this been fixed since 2022? it basically makes the types for enriched activities unusable