Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity.object is typed as string | unknown #515

Open
amakhrov opened this issue Jul 28, 2022 · 1 comment
Open

Activity.object is typed as string | unknown #515

amakhrov opened this issue Jul 28, 2022 · 1 comment

Comments

@amakhrov
Copy link

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

@ammanvedi
Copy link

yeah, ive just found this issue also, why hasnt this been fixed since 2022? it basically makes the types for enriched activities unusable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants