zakodium-oss / react-roi

https://react-roi.pages.dev/
https://react-roi.pages.dev/
0 stars 0 forks source link

Export types used by callback props #147

Open stropitek opened 6 months ago

stropitek commented 6 months ago

For example GetStyleCallback:

export type GetStyleCallback<TData = unknown> = (
  roi: Roi<TData>,
  roiAdditionalState: RoiAdditionalCallbackState,
) => CustomRoiStyle;

Types used by the callback should be exposed by the library. The roi argument should have a more restricted type that keeps what is useful but does not expose implementation details.