PostHog / posthog-node

Official PostHog Node library
MIT License
21 stars 19 forks source link

Update docs for user properties #40

Closed timgl closed 3 years ago

timgl commented 3 years ago

I think the docs on https://posthog.com/docs/libraries/node needs to be updated, seems that properties interface has been updated

interface CommonParamsInterfacePropertiesProp { [key: string]: string | number | Array<any | { [key: string]: string | number }> } image

cc @yakkomajuri this was sent to me by a user, any thoughts? Seems weird that this code example doesn't work

yakkomajuri commented 3 years ago

Actually the types should be updated.

Since the beginning our types haven't allowed another object as a value here, $set didn't change anything, just made it visible.

Original commit for these prop types:

https://github.com/PostHog/posthog-node/commit/f1179750d5640f50b6341cec17f170023519d408#diff-7aa4473ede4abd9ec099e87fec67fd57afafaf39e05d493ab4533acc38547eb8