statsig-io / js-client

Statsig's SDK for client-side javascript applications.
ISC License
17 stars 11 forks source link

Update type export #32

Closed tarao1006 closed 9 months ago

tarao1006 commented 11 months ago

What

I modified the export statement in index.ts to export the GateEvaluationCallback type.

Why

I am now implementing an application using React and using Datadog RUM to track user behavior. And I am trying to start to use the Feature Flag feature provided by Datadog with Statsig. The Datadog official documentation suggests using gateEvaluationCallback from Statsig. I followed the instructions, but when I checked the options in the react-sdk, I couldn't find gateEvaluationCallback in StatsigOptions type, and thus, I faced difficulties in implementing it correctly.

image

https://github.com/statsig-io/react-sdk/blob/925d376939a4ac10ba56fd737201c19eefc7e3ad/src/StatsigOptions.ts#L10-L31

Therefore, I considered creating a pull request in the react-sdk to incorporate gateEvaluationCallback into the options type. However, since the GateEvaluationCallback type is not exported from the js-client, I am initiating this pull request.

Once this pull request is merged, my plan is to create another modified pull request for the react-sdk.

tarao1006 commented 9 months ago

Thank you! https://github.com/statsig-io/react-sdk/commit/15c2f88511d0fbeb431db36fde0333abb2ae26f5